sdaiGetADBType

...

Syntax

//   Visual Studio for Windows
public:
__int64 __declspec(dllexport) __stdcall sdaiGetADBType(
            void    * ADB
        );

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

Property ADB

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

Examples

Here you can find code snippits that show how the API call sdaiGetADBType 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(__int64 model, __int64 ifcPropertySingleValue)
{
    //
    //  for example:
    //    #31313 = IFCPROPERTYSINGLEVALUE('Category',$,IFCLABEL('Rooms'),$);
    //
    char    * name = 0,
            * description = 0,
            * nominalValue = 0,
            * typePath = 0,
            * unit = 0;
    __int64 * 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
}