engiGetAggrTypex
Syntax
// // Strong typing definition // void engiGetAggrTypex( const SdaiAggr aggregate, SdaiPrimitiveType * aggregateType ); // // Weak typing definition // void __declspec(dllexport) __stdcall engiGetAggrTypex( const int_t * aggregate, 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.
#include "./include/ifcengine.h" void WriteAttribute(int_t ifcInstance, char * attributeName, int_t attributeType) { switch (attributeType) { case sdaiAGGR: { int_t * aggregate = 0; sdaiGetAttrBN(ifcInstance, (char*) attributeName, sdaiAGGR, &aggregate); if (value) { int_t cnt = sdaiGetMemberCount(aggregate); for (int_t i = 0; i < cnt; ++i) { int_t aggregateType = 0; engiGetAggrType(aggregate, &aggregateType); switch (aggregateType) { case sdaiSTRING: { char * value = 0; sdaiGetAggrByIndex(aggregate, i, sdaiSTRING, &value); ... } break; ... default: break; } } } } break; ... default: break; } } void WriteAttributes(int_t ifcInstance) { int_t ifcEntity = sdaiGetInstanceType(ifcInstance), attributeCnt = engiGetEntityNoArguments(ifcEntity); for (int_t i = 0; i < attributeCnt; ++i) { int_t attributeType = 0; char * attributeName = 0; engiGetEntityArgumentName(ifcEntity, i, sdaiSTRING, &attributeName); engiGetEntityArgumentType(ifcEntity, i, sdaiSTRING, &attributeType); WriteAttribute(ifcInstance, attributeName, attributeType); } }