sdaiPutADBTypePath

...

Syntax

//
//   Strong typing definition
//
void            sdaiPutADBTypePath(
                        const SdaiADB           ADB,
                        int_t                   pathCount,
                        const char              * path
                    );

static  inline  void    sdaiPutADBTypePath(
                                const SdaiADB           ADB,
                                int_t                   pathCount,
                                char                    * path
                            )
{
    return  sdaiPutADBTypePath(
                    ADB,
                    pathCount,
                    (const char*) path
                );
}


//
//   Weak typing definition
//
void    __declspec(dllexport) __stdcall sdaiPutADBTypePath(
                                                const void              * ADB,
                                                int_t                   pathCount,
                                                const char              * path
                                            );

static  inline  void    sdaiPutADBTypePath(
                                const void              * ADB,
                                int_t                   pathCount,
                                char                    * path
                            )
{
    return  sdaiPutADBTypePath(
                    ADB,
                    pathCount,
                    (const char*) path
                );
}
    

Property ADB

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

Property pathCount

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

Property path

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

Example (based on pure API calls)

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

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

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

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

    return  ifcSIUnitInstance;
}

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

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