sdaiGetADBType

This call can be used to get the used type within this ADB type.

Syntax

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

[DllImport(IFCEngineDLL, EntryPoint = "sdaiGetADBType")]
public static extern Int32 sdaiGetADBType(int_t ADB);    

Property ADB

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

Example (based on pure API calls)

Here you can find code snippits that show how the API call sdaiGetADBType 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'),$);
    //
    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
}