engiGetAggrTypex
Syntax
public const string ifcenginedll = @"ifcengine.dll"; [DllImport(IFCEngineDLL, EntryPoint = "engiGetAggrTypex")] public static extern void engiGetAggrTypex(int_t aggregate, out int_t 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 engiGetAggrTypex 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); } }