Model.hm_attributeindextype#

Model.hm_attributeindextype(entity_type, entity_id, attribute_index)#

Returns the attribute type number 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:

  • hwReturnStatus - Status object

  • HmQueryResult - Result object containing the output values:

    • type (int) - The values returned have the following meanings:

      1 - integer

      2 - double

      3 - string

      4 - 1D integer array

      5 - 1D double array

      6 - entity

      7 - (not supported)

      8 - (not supported)

      9 - 2D integer array

      10 - 2D double array

      11 - string array

      12 - 1D entity array

      13 - 2D entity array

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_attributeindextype(
    entity_type=ent.Property, entity_id=1, attribute_index=4
)

print("Type", result.type)