sdaiGetADBTypePath

This call can be used to get the path of an ADB type.

Syntax

public const string ifcenginedll = @"ifcengine.dll";

[DllImport(IFCEngineDLL, EntryPoint = "sdaiGetADBTypePath")]
public static extern IntPtr sdaiGetADBTypePath(int_t ADB, int_t typeNameNumber);    

Property ADB

Size: 32 bit / 4 byte (reference)
...

Property typeNameNumber

Size: 32 bit / 4 byte (value)
...

Example (based on pure API calls)

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

using RDF;      //  include at least engine.cs within your solution

//
//  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'),$);
    //
    string name, description;
    ifcengine.sdaiGetAttrBN(ifcPropertySingleValue, "Name", ifcengine.sdaiUNICODE, out name);                   //  name = 'Category'
    ifcengine.sdaiGetAttrBN(ifcPropertySingleValue, "Description", ifcengine.sdaiUNICODE, out description);     //  description = null

    Int64 nominalValueADB = 0;
    ifcengine.sdaiGetAttrBN(ifcPropertySingleValue, "NominalValue", ifcengine.sdaiADB, out nominalValueADB);

    string typePath = ifcengine.sdaiGetADBTypePathx(nominalValueADB, 0);                                  //  typePath = 'IFCLABEL'
    switch  (ifcengine.sdaiGetADBType(nominalValueADB)) {
        case  ifcengine.sdaiSTRING:
            string nominalValue;
            ifcengine.sdaiGetADBValue(nominalValueADB, ifcengine.sdaiUNICODE, out nominalValue);  //  nominalValue = 'Rooms'
            break;

        ...

        default:
            break;
    }

    string unit;
    ifcengine.sdaiGetAttrBN(ifcPropertySingleValue, "Unit", ifcengine.sdaiUNICODE, out unit);                   //  unit = null
}