sdaiGetMemberCount

Returns the number of elements within an aggregation.

Syntax

public const string enginedll = @"engine.dll";

[DllImport(enginedll, EntryPoint = "sdaiGetMemberCount")]
public static extern Int32 x86_sdaiGetMemberCount(Int32 aggregate);

[DllImport(enginedll, EntryPoint = "sdaiGetMemberCount")]
public static extern Int32 x64_sdaiGetMemberCount(Int64 aggregate);

public static Int32 sdaiGetMemberCount(Int64 aggregate)
		{
			if (IntPtr.Size == 4)
			{
				var _result = x86_sdaiGetMemberCount((Int32)aggregate);
				return _result;
			}
			else
			{
				return x64_sdaiGetMemberCount(aggregate);
			}
		}    

Property aggregate

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

Example (based on pure API calls)

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

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

void GetColumns(Int64 model)
{
    Int64 ifcColumnInstances = ifcengine.sdaiGetEntityExtentBN(model, "IFCCOLUMN"),
          noIfcColumnInstances = ifcengine.sdaiGetMemberCount(ifcColumnInstances);
    if (noIfcColumnInstances != 0)
    {
        for (Int64 i = 0; i < noIfcColumnInstances; i++)
        {
            Int64 ifcColumnInstance = 0;
            ifcengine.sdaiGetAggrByIndex(ifcColumnInstances, i, ifcengine.sdaiINSTANCE, out ifcColumnInstance);

            string globalId;
            ifcengine.sdaiGetAttrBN(ifcColumnInstance, "GlobalId", ifcengine.sdaiUNICODE, out globalId);

            string name;
            ifcengine.sdaiGetAttrBN(ifcColumnInstance, "Name", ifcengine.sdaiUNICODE, out name);

            string description;
            ifcengine.sdaiGetAttrBN(ifcColumnInstance, "Description", ifcengine.sdaiUNICODE, out description);
        }
    }
}