sdaiPutADBTypePath

...

Syntax

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

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

Property ADB

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

Property pathCount

Size: 64 bit / 8 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: 64 bit / 8 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.);
//

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

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

    return  ifcSIUnitInstance;
}

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

    //  #13131 = IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(1.745E-2), #31313);
    __int64 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;
}