Ema_Model_Attr_Add()
Abstract
Adds a user-defined attribute to the specified model.
Syntax
Ema_Model_Attr_Add (model_id, attr_name, attr_properties)
| 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 Ema_Model_Create(), Ema_Model_Copy(), or Ema_Model_Read() to obtain a model ID.] |
attr_name |
char* |
name of the new attribute |
attr_properties |
EmaT_Object_Id |
numeric object ID of the properties object for the attribute |
Return Type
void
No return value.
Header
ema.h
Details
This function implements the attr_add operator for models. A user-defined attribute is an attribute defined by the user for model-specific purposes.
EMA permits user-defined attributes to be added to any model type. However, only five model types support model attributes: base and derived node models, base and derived link models, and process models. Only these model types will retain model attributes when written out by EMA. Attempts to add an attribute with a name that is identical to an existing attribute will fail, causing an error.