sdaiCreateInstance

...

Syntax

//   Visual Studio for Windows
public:
__int64 __declspec(dllexport) __stdcall sdaiCreateInstance(
            __int64 model,
            __int64 entity
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
int64_t sdaiCreateInstance(
            int64_t model,
            int64_t entity
        );    

Property model

Size: 64 bit / 8 byte (value)
Handle of the model containing the IFC file, this handle is needed in many other calls and given when the model is created.

Property entity

Size: 64 bit / 8 byte (value)
Handle of an entity (schema item/class), for example IFCWALLSTANDARDCASE as defined in IFC4.exp.

Examples

Here you can find code snippits that show how the API call sdaiCreateInstance can be used.

__int64 localCreateInstanceBN(__int64 model, char * entityName)
{
    //
    //  This function is an alternative to the API call sdaiCreateInstanceBN()
    //  based on sdaiCreateInstance().
    //
    //  Use of sdaiCreateInstance() can lead to performance improvement compared to sdaiCreateInstanceBN().
    //
    __int64 entity = sdaiGetEntity(model, entityName);

    return  sdaiCreateInstance(model, entity);
}