Ets_Obj_Attr_Set()
Abstract
Set the value of a given ETS object’s attribute.
Syntax
Ets_Obj_Attr_Set (obj_hndl, attr_name, val_ptr)
| Argument | Type | Description |
|---|---|---|
obj_hndl_ptr |
EtsT_Obj_Handle |
Handle of object of interest. |
attr_name |
char * |
Name of attribute of interest. |
val_ptr |
void * |
New value to be set on the attribute of interest. |
Return Type
EtsT_Compcode
EtsC_Compcode_Success if the attribute exists and is valid. EtsC_Compcode_Failure otherwise.
Header
ets_api_obj.h
Details
The purpose of this function is to set the value field of a specific attribute of an object. The object need not be installed in a model. You may need to set the model attribute first. You cannot change the following attributes on an uninstalled object: orbit, trajectory.
This function can only set attributes of the types listed below. The client has to know the attribute type. (Use Ets_Obj_Attr_Desc_Type_Get() if in doubt.)
| To set an attribute of type… | val_ptr must be… |
|---|---|
int |
int |
double |
double |
string |
char * |
text list |
PrgT_List |
compound attr obj |
EtsT_Obj_Handle |
toggle |
int |
typed file |
char * |
profile |
PrgT_Profile_Spec |