sdaiGetAttrBN

...

Syntax

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

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
void * sdaiGetAttrBN(
            int64_t instance,
            char    * attributeName,
            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 attributeName

Size: 64 bit / 8 byte (reference)
Name of the attribute, for example Name of IFCROOT as defined in IFC4.exp.

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 sdaiGetAttrBN 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);
        }
    }
}