Model.hm_attributeentitytype#
- Model.hm_attributeentitytype(entity_type, entity_id, attribute_name_or_id)#
Returns the entity type number of an entity 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:entityType (int)
Examples#
Get the attribute entity type number of the entity attribute with name * LSD_CID * on property with ID 1 for the LS - DYNA template#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_attributeentitytype( entity_type=ent.Property, entity_id=1, attribute_name_or_id="LSD_CID" ) print("entityType", result.entityType)
Get the attribute entity type number of the entity attribute with ID 412 on property with ID 1 for the LS - DYNA template#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_attributeentitytype( entity_type=ent.Property, entity_id=1, attribute_name_or_id="412" ) print("entityType", result.entityType)