Model.hm_getunusedoremptyentities_forall#

Model.hm_getunusedoremptyentities_forall(mode, outputCollectionSet)#

Returns empty or unused entities, and places them on a collection. The return value is a list of lists. Each sub-list contains the empty or unused entity type as its first value, and the found entity IDs as the remainder of the sub-list.

Parameters:
  • mode (hwString) – The query mode. Valid values are empty, unused, and unusedempty.

  • outputCollectionSet (CollectionSet) – The set of collections containing possibly multiple type of entities.

Returns:

Example#

Get the empty sets out of all entities#
import hm
import hm.entities as ent

model = hm.Model()

output = hm.CollectionSet(model)

_, resultlist = model.hm_getunusedoremptyentities_forall(
    mode="unused",
    outputCollectionSet=output
)

for result in resultlist:
    print("entityType:", result.entityType)
    print("entityIds:", result.entityIds)