sdaiGetADBTypePath

...

Syntax

public const string IFCEngineDLL = @"IFCEngine.dll";

[DllImport(IFCEngineDLL, EntryPoint = "sdaiGetADBTypePathx")]
public static extern void sdaiGetADBTypePath(Int64 ADB, Int64 typeNameNumber, out IntPtr path);    

Property ADB

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

Property typeNameNumber

Size: 64 bit / 8 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(Int64 model, Int64 ifcPropertySingleValue)
{
    //
    //  for example:
    //    #31313 = IFCPROPERTYSINGLEVALUE('Category',$,IFCLABEL('Rooms'),$);
    //
    IntPtr namePtr = IntPtr.Zero,
           descriptionPtr = IntPtr.Zero,
           nominalValuePtr = IntPtr.Zero,
           typePathPtr = IntPtr.Zero,
           unitPtr = IntPtr.Zero;
    Int64 nominalValueADB = 0;

    IfcEngine.x64.sdaiGetAttrBN(ifcPropertySingleValue, System.Text.Encoding.UTF8.GetBytes("Name"), IfcEngine.x64.sdaiUNICODE, out namePtr);                   //  name = 'Category'
    IfcEngine.x64.sdaiGetAttrBN(ifcPropertySingleValue, System.Text.Encoding.UTF8.GetBytes("Description"), IfcEngine.x64.sdaiUNICODE, out descriptionPtr);     //  description = 0

    IfcEngine.x64.sdaiGetAttrBN(ifcPropertySingleValue, System.Text.Encoding.UTF8.GetBytes("NominalValue"), IfcEngine.x64.sdaiADB, out nominalValueADB);
    IfcEngine.x64.sdaiGetADBTypePath(nominalValueADB, 0, out typePathPtr);                                  //  typePath = 'IFCLABEL'
    string typePath = Marshal.PtrToStringAnsi(typePathPtr);
    switch  (IfcEngine.x64.sdaiGetADBType(nominalValueADB)) {
        case  IfcEngine.x64.sdaiSTRING:
            IfcEngine.x64.sdaiGetADBValue(nominalValueADB, IfcEngine.x64.sdaiUNICODE, out nominalValuePtr);
            string nominalValue = Marshal.PtrToStringUni(nominalValuePtr);                                  //  nominalValue = 'Rooms'
            break;

        ...

        default:
            break;
    }

    IfcEngine.x64.sdaiGetAttrBN(ifcPropertySingleValue, System.Text.Encoding.UTF8.GetBytes("Unit"), IfcEngine.x64.sdaiUNICODE, out unitPtr);                   //  unit = 0
}