Model.hm_getunusedoremptyentities_byname#
- Model.hm_getunusedoremptyentities_byname(mode, outputCollectionSet, type, name)#
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.
type (EntityFullType) – The type of entity to query. If not specified, all entities in the database are queried.
name (hwString) – The name of the single entity 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 set entity with name “node_output”#import hm import hm.entities as ent model = hm.Model() output = hm.CollectionSet(model) _, resultlist = model.hm_getunusedoremptyentities_byname( mode="unused", outputCollectionSet=output, type=ent.Set, name="node_output" ) for result in resultlist: print("entityType:", result.entityType) print("entityIds:", result.entityIds)