Model.displaycollectorsbymark#
- Model.displaycollectorsbymark(collection, mode, elements, geometry)#
Changes the display state of collectors in a collection.
- Parameters:
collection (Collection) – The collection containing the entities to change their display state.
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).
elements (int) –
Indicates if elements within collectors are to be turned on or off.
0 - No
1 - Yes
geometry (int) –
Indicates if geometry within collectors are to be turned on or off.
0 - No
1 - Yes
Example#
Turn the elements on in the components named “ fender “ , “ box “ and “ bolt “ , and keep the geometry as it is#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the components components_collection = hm.Collection( model, ent.Component, "Name=fender OR Name=box OR Name=bolt" ) model.displaycollectorsbymark( collection=components_collection, mode="on", elements=1, geometry=0 )