Model.enabledirtinessdetectionforentitytype#
- Model.enabledirtinessdetectionforentitytype(entity_type, enable_flag)#
An automatic mechanism marks includes/modules dirty (modified) when they or entities belonging to them are changed. They get “cleaned” when exported (for includes) or saved as representations (for modules).
Allows the manual override of the automatic mechanism, in case it is needed by a specific work-flow or user request. The change is not persistent. The suggested method is to disable the detection mechanism, issue functions that should not affect dirtiness status, and then re-enable it.
- Parameters:
entity_type (EntityFullType) – The entity type. Valid entities are parts.
enable_flag (int) –
0 - Disables automatic dirtiness detection.
1 - Enables automatic dirtiness detection.
Example#
Disable and enable automatic dirtiness handling for modules ( Parts / Part Assemblies )#import hm import hm.entities as ent model = hm.Model() model.enabledirtinessdetectionforentitytype(entity_type=ent.Part ,enable_flag=0) model.enabledirtinessdetectionforentitytype(entity_type=ent.Part ,enable_flag=1)