engiGetEntityCount

...

Syntax

public const string IFCEngineDLL = @"IFCEngine.dll";

[DllImport(IFCEngineDLL, EntryPoint = "engiGetEntityCount")]
public static extern Int64 engiGetEntityCount(Int64 model);    

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.

Examples

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

void WriteEntities(Int64 model)
{
    Int64 i = 0, cnt = IfcEngine.x64.engiGetEntityCount(model);
    while  (i < cnt)
    {
        IntPtr entityNamePtr = IntPtr.Zero;
        Int64 ifcEntity = IfcEngine.x64.engiGetEntityElement(model, i);
        IfcEngine.x64.engiGetEntityName(ifcEntity, IfcEngine.x64.sdaiSTRING, out entityNamePtr);
        string entityName = Marshal.PtrToStringAnsi(entityNamePtr);
        Console.WriteLine("Entity  " + entityName);
    }
}