Model.displaycollectorsallbymark#

Model.displaycollectorsallbymark(collection_set, mode, elements, geometry)#

Turns the display of a collection of entities on or off, including toggling their current state. The function argument tells the function what it is supposed to do to the entities collected on the collection_set. Entities of many different types can, at the same time, be on the same collection_set.

Parameters:
  • collection_set (CollectionSet) – The set of collections containing possibly multiple type of entities to be displayed or not.

  • mode (hwString) –

    The mode being performed, defined by the following:

    on - All collectors are turned on.

    all - All collectors are turned on.

    off - All collectors are turned off.

    none - All collectors are turned off.

    toggle - All collectors are toggled (visible become invisible and vice-versa).

    reverse - All collectors are toggled (visible become invisible and vice-versa).

    isolate - For the entity types that have entities on collection_set, the entities of the collection are displayed, and all the entities not in the collection are hidden.

    isolate only - For all entity types (regardless if any are on collection_set), the entities in the collection are displayed, and all entities not int he collection are hidden.

  • elements (int) –

    For components and load collectors, determines whether the display affects elements/loads on elements.

    0 - Do not control elements/loads on elements.

    1 - Control elements/loads on elements.

  • geometry (int) –

    For components and load collectors, determines whether the display affects geometry/loads on geometry.

    0 - Do not control geometry/loads on geometry.

    1 - Control geometry/loads on geometry.

Example#

Turn on the element in all the components , and the loads - on - elements of load collector with IDs 1 - 3#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains all the components
components_collection = hm.Collection(model, ent.Component)

# Creating a collection that contains the load collectors with Ids 1-3
loadcols_collection = hm.Collection(model, ent.Loadcol, [1, 2, 3])

# Creating the collection set that contains the collections
Collection_set = hm.CollectionSet(model)
Collection_set.set(components_collection)
Collection_set.set(loadcols_collection)

model.displaycollectorsallbymark(
    collection_set=Collection_set, mode="on", elements=1, geometry=0
)