Model.modelcheck_applyautocorrectiononmark#

Model.modelcheck_applyautocorrectiononmark(checkDisplayName, collectionset, correctionDisplayName)#

Runs auto correction on specific entities for a given check, if checks are run.

Parameters:
  • checkDisplayName (hwString) – The GUI display name of the check. This is case sensitive.

  • collectionset (CollectionSet) – The set of collections containing possibly multiple type of entities for which the model checker is to be run.

  • correctionDisplayName (hwString) –

    The GUI name of the correction. This is case sensitive.

    If not provided, the then default auto correction associated with the check is applied.

Example#

Run the “Delete unused materials” auto correction for all “Unused materials”#
import hm
import hm.entities as ent

model = hm.Model()

mat_collection = hm.Collection(model, ent.Material)

collection_set = hm.CollectionSet(model)

collection_set.set(mat_collection)

model.modelcheck_applyautocorrectiononmark(
    checkDisplayName="Unused materials",
    collectionset=collection_set,
    correctionDisplayName="Delete unused materials",
)