sdaiGetAttr

...

Syntax

//   Visual Studio for Windows
public:
void __declspec(dllexport) * __stdcall sdaiGetAttr(
            __int64 instance,
            void    * attribute,
            __int64 valueType,
            void    * value
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
void * sdaiGetAttr(
            int64_t instance,
            void    * attribute,
            int64_t valueType,
            void    * value
        );    

Property instance

Size: 64 bit / 8 byte (value)
Handle of an instance within an IFC file, for example #31313 = IFCWALLSTANDARDCASE(...)

Property attribute

Size: 64 bit / 8 byte (value)
A handle to the an attribute of a certain entity, for example attribute Name of entity IFCROOT.

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 sdaiGetAttr can be used.

void * localGetAttrBN(__int64 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().
    //
    __int64 instanceType = sdaiGetInstanceType(instance);
    void    * attribute = sdaiGetAttrDefinition(instanceType, attributeName);

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