ObjectSet.count


count(objType, [names])

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

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

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

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

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

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

Returns the number of objects in the set of a particular type Note that count ignores the value of the downward associativity such that it will return 1 if the exactly one single item is requested and present, even if some of its LOFs are also present and the downward associativity flag is set true. This function is exactly equivalent to calling getObjects() and returning the length of the returned array. If you plan to call getObjects() as well as count(), note that it is much more efficient to simply examine the length of the array returned by getObjects(). 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 valueLONG_PTRthe returned number of items For further syntax examples, see add

Example

 call msgbox(visible.count("All"))
 

Back to ObjectSet

Back to Overview