sdaiGetEntityExtentBN

This call retrieves an aggregation that contains all instances of the entity given. Technically sdaiGetEntityExtentBN will transform into the following call

    sdaiGetEntityExtent(
            model,
            sdaiGetEntity(
                    model,
                    entityName
                )
        );

Syntax

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

[DllImport(IFCEngineDLL, EntryPoint = "sdaiGetEntityExtentBN")]
public static extern Int64 sdaiGetEntityExtentBN(int_t model, string entityName);

[DllImport(IFCEngineDLL, EntryPoint = "sdaiGetEntityExtentBN")]
public static extern Int64 sdaiGetEntityExtentBN(int_t model, byte[] entityName);    

Property model

Size: 64 bit / 8 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 entityName

Size: 64 bit / 8 byte (reference)
...

Example (based on pure API calls)

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

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

void GetColumns(Int64 model)
{
    Int64 ifcColumnInstances = IfcEngine.x64.sdaiGetEntityExtentBN(model, System.Text.Encoding.UTF8.GetBytes("IFCCOLUMN")),
          noIfcColumnInstances = IfcEngine.x64.sdaiGetMemberCount(ifcColumnInstances);
    if (noIfcColumnInstances != 0)
    {
        for (Int64 i = 0; i < noIfcColumnInstances; i++)
        {
            Int64 ifcColumnInstance = 0;
            IfcEngine.x64.sdaiGetAggrByIndex(ifcColumnInstances, i, IfcEngine.x64.sdaiINSTANCE, out ifcColumnInstance);

            IntPtr globalIdPtr = IntPtr.Zero;
            IfcEngine.x64.sdaiGetAttrBN(ifcColumnInstance, System.Text.Encoding.UTF8.GetBytes("GlobalId"), IfcEngine.x64.sdaiUNICODE, out globalIdPtr);
            string globalId = Marshal.PtrToStringUni(globalIdPtr);

            IntPtr namePtr = IntPtr.Zero;
            IfcEngine.x64.sdaiGetAttrBN(ifcColumnInstance, System.Text.Encoding.UTF8.GetBytes("Name"), IfcEngine.x64.sdaiUNICODE, out namePtr);
            string name = Marshal.PtrToStringUni(namePtr);

            IntPtr descriptionPtr = IntPtr.Zero;
            IfcEngine.x64.sdaiGetAttrBN(ifcColumnInstance, System.Text.Encoding.UTF8.GetBytes("Description"), IfcEngine.x64.sdaiUNICODE, out descriptionPtr);
            string description = Marshal.PtrToStringUni(descriptionPtr);
        }
    }
}