Model.hm_getentitytype#
- Model.hm_getentitytype(entity_type)#
Returns the entity type ID for the specified
entity_type. Each entity type in is assigned a unique ID. The entity type name is converted to the entity type ID using this function.If
entity_typeis not valid, undefined will be returned.This is the inverse of the
hm_getentityname()function.- Parameters:
entity_type (hwString) – The unique entity type name.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:entityTypeID (unsigned int)
Examples#
Get the type ID of nodes#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getentitytype(entity_type="nodes") print("Entity Type ID:", result.entityTypeID) # Entity Type ID:1
Get the type ID of properties#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getentitytype(entity_type="properties") print("Entity Type ID:", result.entityTypeID) # Entity Type ID:11