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

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().

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com