sdaiCreateAggr

This call creates an aggregation. The instance has to be present, the attribute argument can be empty (0) in case the aggregation is an nested aggregation for this specific instance, prefered use would be use of sdaiCreateNestedAggr in such a case.

Syntax

//
//   Strong typing definition
//
SdaiAggr        sdaiCreateAggr(
                        SdaiInstance            instance,
                        const SdaiAttr          attribute
                    );


//
//   Weak typing definition
//
int_t   __declspec(dllexport) * __stdcall sdaiCreateAggr(
                                                                        int_t                   instance,
                                                                        const void              * attribute
                                                                    );
    

Property instance

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

Property attribute

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

Example (based on pure API calls)

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

#include    "./include/ifcengine.h"
int_t   * localCreateAggrBN(__int64 instance, char * attributeName)
{
    //
    //  This function is an alternative to the API call sdaiCreateAggrBN()
    //  based on sdaiCreateAggr().
    //
    //  Use of sdaiCreateAggr() can lead to performance improvement compared to sdaiCreateAggrBN().
    //
    int_t   instanceType = sdaiGetInstanceType(instance);
    void    * attribute = sdaiGetAttrDefinition(instanceType, attributeName);

    return  sdaiCreateAggr(instance, attribute);
}