NairnFEAMPM Icon

Dictionary of Internal Scripting Objects

Internal scripts work with objects internal to NairnFEAMPM. This page documents all possible objects. The section on Object Attributes and Properties explains the meaning of each section defined for each object. The possible objects are as follows:

Object Attributes and Properties

Objects, which are instances of a certain class type, are defined in internal scripts using object names and those names can be used to get object attributes, to get and set object properties, or to target that object with an object command. The features, which are common to all object types, are as follows:

To-many object lists
Objects many be connected to a list of other objects. To get one of these lists, use the get command. For example
rdoc.get archs,"archives"
gets a list of MPMArchives in a Results Document (with object name rdoc) and assigns object name archs to the list. The returned result will always be a list and it will be an empty list if the object does not have any of the requested objects. You can check the length of any list with @archs.count.
To single objects
Objects may be connected to one type of object. To get one of these objects, use the get command. If any "to-single" object is not found, the get command will return a special None object that can the checked using the ifDef or ifNDef commands or by the class of the returned object.
Properties and "@" Expressions
Object properties are strings or numbers related to the object. Each property can be read with an "@" expression, which as a period-delimited list of keys. Each element can be text or a variable name starting in #, in which case the element is the value of that variable. For example:
#time = @archs.3.time
This example assumes archs is a list of MPMArchives and the second element picks one (by 0-based index and the number can be a variable with a number). Finally "time" is the property that is read. Such "@" expressions can be set equal to a variable (as above) or be used within any expression. Properties that are not designated as read only (or "r/o") can be set using the set command.
    If the initial object in an "@" expression is a List containing strings or numbers, the expression can extract any one of those items using:

#value = @mylist.4

NairnFEAMPM Application

All internal scripts automatically define nfmapp as the object name for the the main NairnFEAMPM application. This object name can be use by internal scripting commands.

Inheritance

To-many object lists

To single objects

Properties

Supported Object Commands

(return to Object Index)

Document

An opened NairnFEAMPM document. This abstract object is not ever used in scripts. It defines relations, properties, and commands that are shared by Command documents and Results document.

Inheritance

To-many object lists

To single objects

Properties

Supported Object Commands

(return to Object Index)

Commands Document

Commands document are documents with commands to set up and run MPM and FEA calculations. A common tasks for internal scripts is to automatically run calculations defined by Command documents.

Inheritance

To-many object lists

To single objects

Properties

Supported Object Commands

(return to Object Index)

Results Document

Results documents have the output from FEA or MPM calculations. Scripts common run calculations and then extract simulations results from Results documents.p

Inheritance

To-many object lists

To single objects

Properties

Supported Object Commands

(return to Object Index)

MPM Archive

Information on one MPM archive file for the current Results document.

Inheritance

To-many object lists

To single objects

Properties

Supported Object Commands

(return to Object Index)

List

This class lets a script create a list that can contain objects or strings (see CreateList command). Various commands are available to work with the list members. Also, all "to-many" object attributes of other classes return this type of list.

Inheritance

To-many object lists

To single objects

Properties

Supported Object Commands

(return to Object Index)

Dictionary

This class lets a script create a dictionary that contains key-value pairs. Various commands are available to work with the keys and values.

Inheritance

To-many object lists

To single objects

Properties

Supported Object Commands

(return to Object Index)

None

This object is returned by any "To-One" object attribute that does not have that connection and by several other commands when an object cannot be found. If objName is a "None" type object, the conditional ifDef objName is false and the conditional ifNDef objName is true. Alternatively, you can check for "None" type object by seeing if @objName.class is equal to "none".

Inheritance

To-many object lists

To single objects

Properties

Supported Object Commands

(return to Object Index)