Model.hm_attributeindextypename#

Model.hm_attributeindextypename(entity_type, entity_id, attribute_index)#

Returns the attribute type string of an indexed attribute on an entity.

Parameters:
  • entity_type (EntityFullType) – The type of entity to query.

  • entity_id (unsigned int) – The ID of the entity.

  • attribute_index (int) – The index of the attribute owned by the queried entity (starting at 1).

Returns:

Example#

Get the attribute type number of the attribute with index 4 on property with ID 1#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_attributeindextypename(
    entity_type=ent.Property, entity_id=1, attribute_index=4
)

print("Type", result.type)