op_ima_sim_attr_get_color()
Abstract
Obtains the value of a color simulation attribute.
Syntax
op_ima_sim_attr_get_color (attr_name, value_ptr)
| Argument | Type | Description |
|---|---|---|
attr_name |
const char * |
name of the attribute-of-interest [This value must specify an attribute defined in the simulation environment, or a prompt will be issued for the attribute’s value.] |
value_ptr |
integer * |
pointer to a variable to be filled with the specified attribute’s value |
Return Type
Compcode
OPC_COMPCODE_SUCCESS if the attribute value was successfully obtained; OPC_COMPCODE_FAILURE otherwise.
Example
/* Obtain the color for failed links */
PrgT_Color color;
op_ima_sim_attr_get_color ("Failed link color", &color);
Details
None.
Purpose
Provides a mechanism to obtain simulation attributes that have been assigned values at simulation runtime. This KP works identically to op_ima_sim_attr_get(), but applies only to simulation attributes of data type color. Refer to op_ima_sim_attr_get() for full purpose and details.
Errors
- Same as op_ima_sim_attr_get().
Reference
- Use the KPs op_ima_obj_attr_get_color() or op_ima_obj_attr_get() to obtain the value of an object color attribute
- Use the KPs op_ima_obj_attr_set_color() or op_ima_obj_attr_set() to assign a value to an object color attribute
- Use the KP op_ima_obj_svar_get() to obtain the value of a process state variable
- Use the KP op_ima_obj_command() to issue a command to an object