Skip to main content

ACP in-app scripting API 2026 R1

ElementSet

Last update: 16.07.2026

class compolyx.ElementSet(graph, obj=None, parent=None)

Element set class.

Exemplary usage

>>> m=db.models.values()[-1]
>>> eset=m.element_sets['DECK']
>>> eset.modify(op='none')
>>> eset.modify(op='new', element_labels=[1,2,3,4])
>>> eset.modify(op='add', element_sets=[ m.element_sets['Deck_layup-1'] ])
>>> eset.modify(op='intersect', x=[-6.5,-5.5])

Attributes

Name Description
ElementSet.active Active status of the object.
ElementSet.boundaries Returns the boundaries of the element set.
ElementSet.element_labels
ElementSet.enabled Indicates whether the object is enabled.
ElementSet.id ID of the object.
ElementSet.is_dict_item Indicates whether the object is an item in a dictionary.
ElementSet.is_list_item Indicates whether the object is an item of a list.
ElementSet.link_path Root path of the current node in the tree for links to this object.
ElementSet.locked Element set is imported and cannot be changed.
ElementSet.middle_offset Middle offset flag.
ElementSet.name Name of the object.
ElementSet.normals Returns the Normals of the element set.
ElementSet.orientable True if the element set has an orientable topology.
ElementSet.parent Parent object in the tree.
ElementSet.planar True if the element set has a planar topology.
ElementSet.root_path Root path of the current node in the tree.
ElementSet.size Number of entities.
ElementSet.status Status of the object.
ElementSet.status_changed Boolean flag which is set to true in C++ when up-to-date status of object changes.
ElementSet.uid UID of the object.
ElementSet.vertex Raises an error if the object has been removed from the graph.

Methods

Name Description
ElementSet.add(entity) Add entity to the set.
ElementSet.clear()
ElementSet.find_parent(type) Steps up the tree and returns the first parent with given type.
ElementSet.get_short_description()
ElementSet.modify([op, element_labels, ...]) General method to modify the elements in an element set.
ElementSet.obj_exists() Checks if __obj still references the c++ object (has not been reset to None by self._delete) and exists in the graph.
ElementSet.partition() Partitions this ElementSet into new ElementSets with an orientable topology.
ElementSet.remove(entity) Remove entity from the set.
ElementSet.serialize() Serialize to Python string.
ElementSet.serialize_name_and_id() Serializes the name and ID.
ElementSet.update()
ElementSet.visit(visitor) Walk through the tree and let the visitor perform action on every descendant node.
ElementSet.write_boundaries(filename[, format]) Write boundaries in .iges/.step format.

Connect with Ansys