Model.hm_includeisdirty#

Model.hm_includeisdirty(includeId, dirtinessAspect='dirty_for_export')#

An automatic mechanism marks includes dirty (modified) when they or entities belonging to them are changed. They get “cleaned” when exported (for includes).

This query returns the dirtiness status of an include for a specific aspect. For checking the status of parts, use Model.hm_entityisdirty.

Parameters:
  • includeId (unsigned int) – The HyperMesh ID of an include or module.

  • dirtinessAspect (hwString) – Should always be set to “dirty_for_export”. Parameter exists to support other aspects in the future.

Returns:

  • hwReturnStatus - Status object

  • HmQueryResult - Result object containing the output values:

    • isDirty (int) - The status of an entity for the specified aspect.

      0 - Not dirty.

      1 - Dirty.

Example#

Ask whether include file with ID 1 is “dirty_for_export”#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_includeisdirty(includeId=1, dirtinessAspect="dirty_for_export")

print("Is the include dirty for export?", bool(result.isDirty))