Model.hm_attributeidentifier#
- Model.hm_attributeidentifier(entity_type, entity_id, attribute_name_or_id)#
Returns the identifier flag of an attribute on an entity for the current template. If the attribute does not exist on the entity, or is not an attribute from the current template, an error is returned.
- Parameters:
entity_type (EntityFullType) – The type of entity to query.
entity_id (int) – The ID of the entity.
attribute_name_or_id (hwString) – The name or ID of the attribute to query. The attribute must be in the current template.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:id (int)
Example#
Get the * CNVGADD_CONVGID * dataname in load collector with ID 14 in Optistruct profile#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_attributeidentifier( entity_type=ent.Loadcol, entity_id=14, attribute_name_or_id="CNVGADD_CONVGID" ) print("id", result.id)