getObject(obj, [filterType], [filterNames])
getObject(array, [filterType], [filterNames])
getObject(attrType, [names], [filterType], [filterNames])
getObject(attrType, names, masterSlave, [filterType], [filterNames])
getObject(eleType, [filterType], [filterNames])
getObject(stressModel, [filterType], [filterNames])
Fetch the specified object by name or ID or attribute assignment. It is an error to call this function with parameters that do not match exactly one object. If in doubt about the number of objects that might be returned, use getObjects(). If you plan to call getObject() conditionally upon the result of a call to exists(), note that it is much more efficient to call getObjects() and check the length of the returned array instead.
objType | string | Name of an object type, such as "point", or "line" "Point", "Line", "Element", etc |
names | string | Name(s)/ID(s) of objects or attributes. Examples are ""bob"", "Structural Support 2", "3", "1T5" |
obj | object | An object to act on. Typically another ObjectSet object, or any other object derived from DatabaseMember |
array | array | An array of objects derived from DatabaseMember |
filterType | string | Restricts operation of this function to only objects of the type given |
filterNames | string | Restricts operation of this function to only those objects whose names/IDs are given |
attrType | string | "Loading", "Support", "Material", etc |
masterSlave | boolean | "Master"/true or "Slave"/false |
eleType | string | Name of a LUSAS element, e.g. "QTS4" |
stressModel | string | Name of a LUSAS stress model e.g. "Thick Shell" |
Return value | IFDatabaseMember | the returned object |
Example
To get element 5
For further syntax examples, see add
set ele5 = db.getObject("Element", 5)
Back to ObjectSet
Back to Overview