ObjectSet.getObjects


getObjects(objType, [names])

getObjects(obj, [filterType], [filterNames])

getObjects(array, [filterType], [filterNames])

getObjects(attrType, [names], [filterType], [filterNames])

getObjects(attrType, names, masterSlave, [filterType], [filterNames])

getObjects(eleType, [filterType], [filterNames])

getObjects(stressModel, [filterType], [filterNames])

Fetch the specified object(s) as an array. The array can then be looped in the normal way. When called with an ObjectSet or an array, this function acts on all the objects contained within it. When called with attributes, it acts on those objects that have an assignment to the attributes given. In each case, an additional filter can be performed by specifying the type (and optionally name(s)) of objects to be acted on.

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 valuearray of DatabaseMember objects the returned array

Example

To loop all visible elements

 eleArray =  visible.getObjects("Element")
 for i = 0 to ubound(eleArray)
    set ele = eleArray(i)
    call msgbox(ele.getID())
 next
To loop all selected points with IDs 1 to 100 that are assigned to Support "fixed"
 pntArray = selection.getObjects("Support", "fixed", "Point", "1T100")
 for i = 0 to ubound(pntArray)
    set p = pntArray(i)
    call msgbox(p.getID())
 next
For further syntax examples, see add

Back to ObjectSet

Back to Overview