engiGetAggrElement

...

Syntax

//   Visual Studio for Windows
public:
void __declspec(dllexport) * __stdcall engiGetAggrElement(
            __int32 * aggregate,
            __int32 elementIndex,
            __int32 valueType,
            void    * value
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
void * engiGetAggrElement(
            int32_t * aggregate,
            int32_t elementIndex,
            int32_t valueType,
            void    * value
        );    

Property aggregate

Size: 32 bit / 4 byte (value)
Handle of an aggregation (i.e. sorted collection).

Property elementIndex

Size: 32 bit / 4 byte (value)
Integer value equal or larger then 0 and smaller than given maximum length of list of elements used.

Property valueType

Size: 32 bit / 4 byte (value)
Type of the value, for example sdaiSTRING, sdaiINSTANCE, sdaiREAL, ...

Property value

Size: 32 bit / 4 byte (reference)
Placeholder for the information, formatting depending on defined valueType.

Examples

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

void    GetColumns(__int32 model)
{
    __int32 ifcColumnInstances = sdaiGetEntityExtentBN(model, "IFCCOLUMN"),
            noIfcColumnInstances = sdaiGetMemberCount(ifcColumnInstances);
    if  (noIfcColumnInstances) {
        for  (__int32 i = 0; i < noIfcColumnInstances; i++) {
            __int32 ifcColumnInstance = 0;
            engiGetAggrElement(ifcColumnInstances, i, sdaiINSTANCE, &ifcColumnInstance);

            char    * globalId = 0, * name = 0, * description = 0;
            sdaiGetAttrBN(ifcColumnInstance, "GlobalId", sdaiSTRING, &globalId);
            sdaiGetAttrBN(ifcColumnInstance, "Name", sdaiSTRING, &name);
            sdaiGetAttrBN(ifcColumnInstance, "Description", sdaiSTRING, &description);
        }
    }
}