Model.hm_attributereferencecount#
- Model.hm_attributereferencecount(entity)#
Returns the number of times an entity is referenced as an entity attribute.
- Parameters:
entity (Entity) – The object describing the entity to query.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:referenceCount (int)
Example#
Get the number of times the material with ID 6 is referenced as an entity attribute#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_attributereferencecount(entity=ent.Material(model,6)) print("Number of times:", result.referenceCount)