engiGetAggrType

...

Syntax

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

[DllImport(enginedll, EntryPoint = "engiGetAggrType")]
public static extern void x86_engiGetAggrType(Int32 aggregate, out Int32 aggregateType);

[DllImport(enginedll, EntryPoint = "engiGetAggrType")]
public static extern void x64_engiGetAggrType(Int64 aggregate, out Int64 aggregateType);

public static void engiGetAggrType(Int64 aggregate, out Int64 aggregateType)
		{
			if (IntPtr.Size == 4)
			{
				x86_engiGetAggrType((Int32)aggregate, out Int32 _aggregateType);
				aggregateType = _aggregateType;
			}
			else
			{
				x64_engiGetAggrType(aggregate, out aggregateType);
			}
		}    

Property aggregate

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

Property aggregateType

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

Example (based on pure API calls)

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

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

void WriteAttribute(Int64 ifcInstance, string attributeName, Int64 attributeType)
{
    switch  (attributeType) {
        case  ifcengine.sdaiAGGR:
            Int64 aggregate = 0;
            ifcengine.sdaiGetAttrBN(ifcInstance, attributeName, ifcengine.sdaiAGGR, out aggregate);
            if (aggregate != 0)
            {
                Int64 cnt = ifcengine.sdaiGetMemberCount(aggregate);
                for (Int64 i = 0; i < cnt; i++)
                {
                    Int64 aggregateType = 0;
                    ifcengine.engiGetAggrType(aggregate, out aggregateType);
                    switch (aggregateType) {
                        case  ifcengine.sdaiSTRING:
                            {
                                string value;
                                ifcengine.sdaiGetAggrByIndex(aggregate, i, ifcengine.sdaiUNICODE, out value);
                                ...
                            }
                            break;

                        ...

                        default:
                            break;
                    }
                }
            }
            break;

        ...

        default:
            break;
    }
}

void WriteAttributes(Int64 ifcInstance)
{
    Int64 ifcEntity = ifcengine.sdaiGetInstanceType(ifcInstance),
          attributeCnt = ifcengine.engiGetEntityNoArguments(ifcEntity);

    for (Int64 i = 0; i < attributeCnt; i++)
    {
        string attributeName = ifcengine.engiGetEntityArgumentName(ifcEntity, i);
        Int64 attributeType = 0;
        ifcengine.engiGetEntityArgumentType(ifcEntity, i, out attributeType);
        WriteAttribute(ifcInstance, attributeName, attributeType);
    }
}