Object Set

Base Class: DatabaseOperations

Derived Classes: Selection Group

Description

A generic set, which remembers a list of DatabaseMember objects. The list can be added to and removed from in a variety of ways at any time. A set can be regarded as a temporary group that does not have a name and does not appear in the group treeview. Within Modeller itself, all selections, visible sets, results sets, groups and even the database itself are implemented in this way. Therefore the functionality here is equally applicable to all these objects

In its most simple usage, the script programmer can simply add, say, a surface and two lines to a set. The set can then be used, for example, to assign attributes, or as a convenient way of grouping the three items together for any other purpose.

The real power of the sets though is their ability to interpret many forms of input, and derive a list of objects to be added or removed based on that input. For example, adding a concentrated load attribute will actually add all the objects to which that concentrated load attribute is assigned. Adding another set or group adds all the members of that set or group. So to select all the members of a group, the line 'selection.add(group)' is used. Similarly adding the element type 'HX20' will actually add all elements of type HX20.

Additionally the input may be 'filtered' by object type, name, and ID. So, for example, 'selection.add("HX20", "volume", "1T10") will first identify all the elements of type HX20. Then it will find their parent volumes. Finally, only volumes with IDs between 1 and 10 will actually be selected.

For complete control, all the functionality described above works for the 'add', 'remove', 'keep', 'delete', 'exists', 'count' and 'getObjects' functions in exactly the same way.

As well as interacting with Modeller's own intrinsic set objects, the script programmer is free to create temporary set objects for any reason at any time. Use newObjectSet to create such a set. Note that if you create a temporary set, it is your responsibility to maintain the integrity of any objects stored in it. I.e. if you add an object to a temporary set and then delete the object, the set will still contain a reference to that deleted item, and this may cause some operations to fail. It is therefore your responsibility to remember to remove objects any temporary sets that you have created before such objects are deleted. Modeller does this job for you for the intrinsic sets that it knows about (visible, selection, groups, etc).

Available Functions:
 add(array, [filterType], [filterNames])
 add(attrType, [names], [filterType], [filterNames])
 add(attrType, names, masterSlave, [filterType], [filterNames])
 add(eleType, [filterType], [filterNames])
 add(obj, [filterType], [filterNames])
 add(objType, [names])
 add(stressModel, [filterType], [filterNames])
 addColinearNeighbours(angularTolerance)
 addHOF()
 addHOF(attrType, [names])
 addHOF(objType, [names])
 addLOF()
 addLOF(attrType, [names])
 addLOF(objType, [names])
 addMatchedObjects(distTol)
 addPlanarNeighbours(angularTolerance, externalOnly)
 contains(pSet)
 count(array, [filterType], [filterNames])
 count(attrType, [names], [filterType], [filterNames])
 count(attrType, names, masterSlave, [filterType], [filterNames])
 count(eleType, [filterType], [filterNames])
 count(obj, [filterType], [filterNames])
 count(objType, [names])
 count(stressModel, [filterType], [filterNames])
 Delete(array, [filterType], [filterNames])
 Delete(attrType, [names], [filterType], [filterNames])
 Delete(attrType, names, masterSlave, [filterType], [filterNames])
 Delete(eleType, [filterType], [filterNames])
 Delete(obj, [filterType], [filterNames])
 Delete(objType, [names])
 Delete(stressModel, [filterType], [filterNames])
 exists(array, [filterType], [filterNames])
 exists(attrType, [names], [filterType], [filterNames])
 exists(attrType, names, masterSlave, [filterType], [filterNames])
 exists(eleType, [filterType], [filterNames])
 exists(obj, [filterType], [filterNames])
 exists(objType, [names])
 exists(stressModel, [filterType], [filterNames])
 getAsString(type)
 getObject(array, [filterType], [filterNames])
 getObject(attrType, [names], [filterType], [filterNames])
 getObject(attrType, names, masterSlave, [filterType], [filterNames])
 getObject(eleType, [filterType], [filterNames])
 getObject(obj, [filterType], [filterNames])
 getObject(objType, [names])
 getObject(stressModel, [filterType], [filterNames])
 getObjects(array, [filterType], [filterNames])
 getObjects(attrType, [names], [filterType], [filterNames])
 getObjects(attrType, names, masterSlave, [filterType], [filterNames])
 getObjects(eleType, [filterType], [filterNames])
 getObjects(obj, [filterType], [filterNames])
 getObjects(objType, [names])
 getObjects(stressModel, [filterType], [filterNames])
 keep(array, [filterType], [filterNames])
 keep(attrType, [names], [filterType], [filterNames])
 keep(attrType, names, masterSlave, [filterType], [filterNames])
 keep(eleType, [filterType], [filterNames])
 keep(obj, [filterType], [filterNames])
 keep(objType, [names])
 keep(stressModel, [filterType], [filterNames])
 remove(array, [filterType], [filterNames])
 remove(attrType, [names], [filterType], [filterNames])
 remove(attrType, names, masterSlave, [filterType], [filterNames])
 remove(eleType, [filterType], [filterNames])
 remove(obj, [filterType], [filterNames])
 remove(objType, [names])
 remove(stressModel, [filterType], [filterNames])
 removeAssignments(attributeType)
 removeHOF()
 removeLOF()
 replaceWithHOF()
 replaceWithLOF()
 sameContents(pSet)
 setIDs(pSettings)

Back to Overview