sdaiGetADBTypePath

...

Syntax

//   Visual Studio for Windows
public:
char __declspec(dllexport) * __stdcall sdaiGetADBTypePath(
            void    * ADB,
            __int32 typeNameNumber
        );

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

Property ADB

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

Property typeNameNumber

Size: 32 bit / 4 byte (value)
Enables the user to define the output, typical use is sdaiSTRING, sdaiUNICODE or sdaiEXPRESSSTRING.

Examples

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

//
//  ENTITY IfcProperty;
//      Name                     : IfcIdentifier;
//      Description              : OPTIONAL IfcText;
//    INVERSE
//      PropertyForDependance    : SET OF IfcPropertyDependencyRelationship FOR DependingProperty;
//      PropertyDependsOn        : SET OF IfcPropertyDependencyRelationship FOR DependantProperty;
//      PartOfComplex            : SET [0:1] OF IfcComplexProperty FOR HasProperties;
//  ENTITY IfcSimpleProperty;
//  ENTITY IfcPropertySingleValue;
//      NominalValue             : OPTIONAL IfcValue;
//      Unit                     : OPTIONAL IfcUnit;
//
void    GetIfcPropertySingleValue(__int32 model, __int32 ifcPropertySingleValue)
{
    //
    //  for example:
    //    #31313 = IFCPROPERTYSINGLEVALUE('Category',$,IFCLABEL('Rooms'),$);
    //
    char    * name = 0,
            * description = 0,
            * nominalValue = 0,
            * typePath = 0,
            * unit = 0;
    __int32 * nominalValueADB = 0;

    sdaiGetAttrBN(ifcPropertySingleValue, "Name", sdaiSTRING, &name);                   //  name = 'Category'
    sdaiGetAttrBN(ifcPropertySingleValue, "Description", sdaiSTRING, &description);     //  description = 0

    sdaiGetAttrBN(ifcPropertySingleValue, "NominalValue", sdaiADB, &nominalValueADB);
    typePath = sdaiGetADBTypePath(nominalValueADB, 0);                                  //  typePath = 'IFCLABEL'
    switch  (sdaiGetADBType(nominalValueADB)) {
        case  sdaiSTRING:
            sdaiGetADBValue(nominalValueADB, sdaiSTRING, (void *) &nominalValue);       //  nominalValue = 'Rooms'
            break;

        ...

        default:
            break;
    }

    sdaiGetAttrBN(ifcPropertySingleValue, "Unit", sdaiSTRING, &unit);                   //  unit = 0
}