sdaiCreateInstance

This call creates an instance of the given entity

Syntax

public const string ifcenginedll = @"ifcengine.dll";

[DllImport(IFCEngineDLL, EntryPoint = "sdaiCreateInstance")]
public static extern Int32 sdaiCreateInstance(int_t model, int_t entity);    

Property model

Size: 32 bit / 4 byte (value)
The handle to the 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 entity

Size: 32 bit / 4 byte (value)
...

Example (based on pure API calls)

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

using RDF;      //  include at least engine.cs within your solution

Int64 localCreateInstanceBN(Int64 model, byte[] 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 = IfcEngine.x64.sdaiGetEntity(model, entityName);

    return IfcEngine.x64.sdaiCreateInstance(model, entity);
}