Model.hm_attributelist_byentityname#
- Model.hm_attributelist_byentityname(entity_type, entity_name, value)#
Returns a list of all attribute IDs or names assigned to a specific entity for the current template.
- Parameters:
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:Keys valid for
value="id"value (numpy.ndarray)
Keys valid for
value="name"value (list of strings)
Examples#
List the attribute IDs for the current template assigned to material with name “ mat1 “#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_attributelist(entity_type=ent.Material, entity_name="mat1", value="id") print("value", result.value)
List the attribute names for the current template assigned to material with name “ mat1 “#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_attributelist(entity_type=ent.Material, entity_name="mat1", value="name") print("value", result.value)