Ema_Object_Nth()
Abstract
Obtains the object ID of the nth object of the specified type.
Syntax
Ema_Object_Nth (model_id, object_type, n)
| Argument | Type | Description |
|---|---|---|
model_id |
EmaT_Model_Id |
numeric model ID of the model-of-interest [This value is a numeric identifier that references a model. Use the functions Ema_Model_Create(), Ema_Model_Copy(), or Ema_Model_Read() to obtain a model ID.] |
object_type |
EmaT_Object_Type |
object type code of the object-of-interest |
n |
int |
numeric index of the object-of-interest |
Return Type
EmaT_Object_Id
numeric object ID of the specified object, or EMAC_NULL_OBJ_ID if an error occurs
Header
ema.h
Details
This function implements the nth operator for objects.
This function is useful within loops that process all objects of a particular type, as the method of obtaining the object ID of each object.
This function is often used with code that gets the number of objects in the model, as shown in the Details section for Ema_Model_Attr_Get().