Model.segmentsetremoveelems#

Model.segmentsetremoveelems(name, collection)#

Removes elements from a segment set. If all elements are removed, the empty segment set still exists.

Parameters:
  • name (hwString) – The name of the segment set to update.

  • collection (Collection) – The collection containing the element entities to remove.

Example#

Remove elements with IDs 100 and 101 from the segment set “ test “#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains the elements to remove
elements_collection = hm.Collection(model, ent.Element, [100, 101])

model.segmentsetremoveelems(name="test", collection=elements_collection)