Model.hm_attributesolverarrayvalues_byentityname#
- Model.hm_attributesolverarrayvalues_byentityname(entity_type, entity_name, attribute_name)#
Returns the solver code and all values for a 1D array attribute on an entity. The function first searches to find the specified attribute for the current template. If the attribute is not found for the current template, the search can be extended to search all attributes assigned to the entity. If the attribute does not exist on the entity, an error is returned.
- Parameters:
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:solverCode (int)
values (list of strings)
Example#
Get the solver code and all values of the 1D array for the attribute with name “ Example “ on material withname “ mat1 “ , consider all attributes#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_attributesolverarrayvalues_byentityname( entity_type=ent.Material, entity_name="mat1", attribute_name="Example" ) print("Solver Code:", result.solverCode) print("values", result.values)