Model.hm_metadata_bycollection#
- Model.hm_metadata_bycollection(collection)#
Returns all metadata attached to the entities on the collection.
- Parameters:
collection (Collection) – The collection containing the entities to return the metadata.
- Returns:
hwReturnStatus- Status objectHmQueryResultList- Result list object containingHmQueryResultobjects with the following output data:entity (Entity) - The entity to which the metadata is attached.
name (hwString) - The name of the metadata.
value (Union[bool, str, float, int, list, numpy.ndarray, Entity, EntityList]) - The value of the metadata.
Example#
Find all metadata attached to the displayed surfaces#import hm import hm.entities as ent model = hm.Model() surfs = hm.CollectionByDisplayed(model, ent.Surface) _, resultlist = model.hm_metadata_bycollection(collection=surfs) for result in resultlist: print("Entity ID:", result.entity.id, "| Metadata Name:", result.name, "| Metadata Value:", result.value)