C_CreateObject

Call C_CreateObject to create a new object of the specified type in the specified model.

void C_CreateObject(

TOrcFxAPIHandle ModelHandle,

int ObjectType,

TOrcFxAPIHandle *lpObjectHandle,

int *lpStatus

);

Parameters

ModelHandle (IN)

The handle of the model.

ObjectType (IN)

Specifies what type of object to create. This can be one of the object type constants defined in OrcFxAPI.h. For example, to create a vessel pass otVessel for this parameter. Alternatively the parameter can be the return value of a call to C_GetObjectType.

lpObjectHandle (OUT)

Points to a variable in which the new object's handle will be returned.

lpStatus (OUT)

Points to a variable in which the status result for the function call will be returned.

Remarks

If you are maintaining a list of objects associated with this model handle, you must update it to include the new object created by this procedure.

See also

C_CreateClone, C_CreateClone2, C_CreateClone3, C_DestroyObject.