Model.hm_getentities_dirty_includes#

Model.hm_getentities_dirty_includes(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 include IDs. For parts, use Model.hm_getentities_dirty.

Parameters:
  • EntityFullType (hwString) – Currently, only includes and modules are valid entity types.

  • dirtiness_aspect (hwString) – Must always be defined as “dirty_for_export”. The parameter exists to support other aspects in the future.

Returns:

  • hwReturnStatus - Status object

  • HmQueryResult - Result object containing the output values:

    • entities (list) - List of entity objects for entity_type set to Parts or list of include IDs for entity_type set to Includes.

Example#

Get the list of dirty Parts#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_getentities_dirty_includes("includes")

print("Dirty include IDs:", result.entities)