sdaiGetAttrDefinition

...

Syntax

//
//   Strong typing definition
//
SdaiAttr        sdaiGetAttrDefinition(
                        SdaiEntity              entity,
                        const char              * attributeName
                    );

static  inline  SdaiAttr    sdaiGetAttrDefinition(
                                    SdaiEntity              entity,
                                    char                    * attributeName
                                )
{
    return  sdaiGetAttrDefinition(
                    entity,
                    (const char*) attributeName
                );
}


//
//   Weak typing definition
//
void    __declspec(dllexport) * __stdcall   sdaiGetAttrDefinition(
                                                    int_t                   entity,
                                                    const char              * attributeName
                                                );

static  inline  void    * sdaiGetAttrDefinition(
                                int_t                   entity,
                                char                    * attributeName
                            )
{
    return  sdaiGetAttrDefinition(
                    entity,
                    (const char*) attributeName
                );
}
    

Property entity

Size: 64 bit / 8 byte (value)
...

Property attributeName

Size: 64 bit / 8 byte (reference)
...

Example (based on pure API calls)

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

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

    return  sdaiGetAttr(instance, attribute, valueType, value);
}