sdaiPutADBTypePath

...

Syntax

//   Visual Studio for Windows
public:
void __declspec(dllexport) __stdcall sdaiPutADBTypePath(
            void    * ADB,
            __int32 pathCount,
            char    * path
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
void sdaiPutADBTypePath(
            void    * ADB,
            int32_t pathCount,
            char    * path
        );    

Property ADB

Size: 32 bit / 4 byte (value)
Handle to ADB type, a typical representation is IFCLABEL('myLabel') or IFCINTEGER(313).

Property pathCount

Size: 32 bit / 4 byte (value)
The number of path's for this ADB type, in case of IFC4 and all earlier versions this should always be 1.

Property path

Size: 32 bit / 4 byte (reference)
The path of the ADB type, in case of example IFCLABEL('myLabel') the path is "IFCLABEL".

Examples

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

//
//  #13131 = IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(1.745E-2), #31313);
//  #31313 = IFCSIUNIT(*, .PLANEANGLEUNIT., $, .RADIAN.);
//

__int32 buildSIUnitInstance(__int32 model, char * UnitType, char * Prefix, char * Name)
{
    //  #31313 = IFCSIUNIT(*, .PLANEANGLEUNIT., $, .RADIAN.);
    __int32 ifcSIUnitInstance = sdaiCreateInstanceBN(model, "IFCSIUNIT");

    sdaiPutAttrBN(ifcSIUnitInstance, "UnitType", sdaiENUM, UnitType);
    if  (Prefix) {
        sdaiPutAttrBN(ifcSIUnitInstance, "Prefix", sdaiENUM, Prefix);
    }
    sdaiPutAttrBN(ifcSIUnitInstance, "Name", sdaiENUM, Name);

    return  ifcSIUnitInstance;
}

__int32	buildMeasureWithUnitInstance(__int32 model)
{
    void    * valueComponentADB;
    double  valueComponent= 0.01745;

    //  #13131 = IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(1.745E-2), #31313);
    __int32 ifcMeasureWithUnitInstance = sdaiCreateInstanceBN(model, "IFCMEASUREWITHUNIT");

    valueComponentADB = sdaiCreateADB(sdaiREAL, &valueComponent);
    sdaiPutADBTypePath(valueComponentADB, 1, "IFCPLANEANGLEMEASURE"); 
    sdaiPutAttrBN(ifcMeasureWithUnitInstance, "ValueComponent", sdaiADB, (void*) valueComponentADB);

    sdaiPutAttrBN(ifcMeasureWithUnitInstance, "UnitComponent", sdaiINSTANCE, (void*) buildSIUnitInstance(model, "PLANEANGLEUNIT", 0, "RADIAN"));

    return  ifcMeasureWithUnitInstance;
}