Model.entitysetdirty#
- Model.entitysetdirty(entity, dirtiness_aspect, dirty_flag)#
An automatic mechanism marks includes/parts dirty (modified) when they or entities belonging to them are changed. They get “cleaned” when exported (for includes) or saved representations (for parts).
Allows the manual manipulation of their dirty status to override the automatic mechanism if it is needed by a specific work-flow or user request.
- Parameters:
entity (Entity) – The object describing the entity. Currently, only includes and parts are valid entity types.
dirtiness_aspect (hwString) – Should always be “dirty_for_export”. Parameter exists to support other aspects in the future.
dirty_flag (int) –
0 - Clears the dirty flag, making the entity “clean.”
1 - Sets the dirty flag, marking the entity as “modified.”
Example#
“Clean” part with name “ SpotWelds “#import hm import hm.entities as ent model = hm.Model() model.entitysetdirty( entity=ent.Part(model, " SpotWelds "), dirtiness_aspect="dirty_for_export", dirty_flag=0 )