Model.hm_getunusedoremptyentities_bycollection#
- Model.hm_getunusedoremptyentities_bycollection(mode, outputCollectionSet, inputCollection)#
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.
inputCollection (Collection) – The collection containing the entities to query.
- Returns:
hwReturnStatus- Status objectHmQueryResultList- Result list object containingHmQueryResultobjects with the following output data:entityType (str)
entityIds (numpy.ndarray)
Example#
Get the the empty sets out of sets with IDs 1, 2 and 3#import hm import hm.entities as ent model = hm.Model() sets = hm.Collection(model, ent.Set, [1, 2, 3]) output = hm.CollectionSet(model) _, resultlist = model.hm_getunusedoremptyentities_bycollection( mode="empty", outputCollectionSet=output, inputCollection=sets ) for result in resultlist: print("entityType:", result.entityType) print("entityIds:", result.entityIds)