ObjectSet.getObject


getObject(objType, [names])

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.

objTypestringName of an object type, such as "point", or "line" "Point", "Line", "Element", etc
namesstringName(s)/ID(s) of objects or attributes. Examples are ""bob"", "Structural Support 2", "3", "1T5"
objobjectAn object to act on. Typically another ObjectSet object, or any other object derived from DatabaseMember
arrayarrayAn array of objects derived from DatabaseMember
filterTypestringRestricts operation of this function to only objects of the type given
filterNamesstringRestricts operation of this function to only those objects whose names/IDs are given
attrTypestring "Loading", "Support", "Material", etc
masterSlaveboolean"Master"/true or "Slave"/false
eleTypestringName of a LUSAS element, e.g. "QTS4"
stressModelstringName of a LUSAS stress model e.g. "Thick Shell"
Return valueIFDatabaseMemberthe returned object

Example

To get element 5

 set ele5 = db.getObject("Element", 5)
For further syntax examples, see add

Back to ObjectSet

Back to Overview