Model.hm_getentities_dirty#
- Model.hm_getentities_dirty(entity_type, dirtiness_aspect='dirty_for_export')#
An automatic mechanism marks includes/parts as dirty (modified) when they or entities belonging to them are changed. They get “cleaned” when exported (for includes) or saved as representations (for parts).
This function returns a list of dirty part entity objects. For includes, see Model.hm_getentities_dirty_includes.
- Parameters:
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:entities (list) - List of entity objects for
entity_typeset to Parts or list of include IDs forentity_typeset to Includes.
Example#
Get the list of dirty Parts#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getentities_dirty(ent.Part) for part in result.entities: print("Dirty parts:", part.id, part.name)