Model.hm_attributeidfromname#
- Model.hm_attributeidfromname(attribute_name)#
Returns an attribute ID from the attribute name for the current template. If the attribute does not exist in the current template, an error is returned.
- Parameters:
attribute_name (hwString) – The name of the attribute to query.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:id (int)
Example#
Get the attribute ID of the OptiStruct * PSHELL_T * attribute#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_attributeidfromname( attribute_name="PSHELL_T" ) print("id", result.id)