CopyModel

This function copies the complete structure of a model towards another or new model.
In case the targetModel is empty a new model will be created.
The owlInstance array (values) and it's cardinality (card) can be empty, in case they are
non-empty the values are expected to contain owlInstance handles referencing in the source model
after a successful copy the values will be adjusted into values referencing the copied owl instances
in the new model. the list of values does not have to be complete or even unique and can even be empty.

sourceModel is not allowed to be empty, targetModel however can be empty or even equal to the source model.

The return value is the targetModel or in case this value was empty the newly created model.

Syntax

//   Visual Studio for Windows
public:
__int64 __declspec(dllexport) __stdcall CopyModel(
            __int64             sourceModel,
            __int64             targetModel,
            __int64             * values,
            __int64             card
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
int64_t CopyModel(
            int64_t             sourceModel,
            int64_t             targetModel,
            int64_t             * values,
            int64_t             card
        );    

Property sourceModel

Size: 64 bit / 8 byte (value)
The handle to the source model. The model handle is static during its existance. Several models can be opened simultaniously within one session. Different models are always independent, threads are allowed to be running on different models simultaniously.

Property targetModel

Size: 64 bit / 8 byte (value)
The handle to the target model. The model handle is static during its existance. Several models can be opened simultaniously within one session. Different models are always independent, threads are allowed to be running on different models simultaniously.

Property values

Size: 32 bit / 4 byte (reference)
The output array for object properties content. The contents memory is allocated by the library

Property card

Size: 64 bit / 8 byte (value)
The cardinality (i.e. number of elements) of the array as given or returned.