engiGetAggrElement

...

Syntax

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

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

Property aggregate

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

Property elementIndex

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

Property valueType

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

Property value

Size: 64 bit / 8 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(__int64 model)
{
    __int64 ifcColumnInstances = sdaiGetEntityExtentBN(model, "IFCCOLUMN"),
            noIfcColumnInstances = sdaiGetMemberCount(ifcColumnInstances);
    if  (noIfcColumnInstances) {
        for  (__int64 i = 0; i < noIfcColumnInstances; i++) {
            __int64 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);
        }
    }
}