sdaiGetAttrDefinition

...

Syntax

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

[DllImport(IFCEngineDLL, EntryPoint = "sdaiGetAttrDefinition")]
public static extern Int32 sdaiGetAttrDefinition(int_t entity, string attributeName);

[DllImport(IFCEngineDLL, EntryPoint = "sdaiGetAttrDefinition")]
public static extern Int32 sdaiGetAttrDefinition(int_t entity, byte[] attributeName);    

Property entity

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

Property attributeName

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

Example (based on pure API calls)

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

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

Int64 localGetAttrBN(Int64 instance, byte[] attributeName, Int64 valueType, out Int64 value)
{
    //
    //  This function is an alternative to the API call sdaiGetAttrBN()
    //  based on sdaiGetAttr().
    //
    //  Use of sdaiGetAttr() can lead to performance improvement compared to sdaiGetAttrBN().
    //
    Int64 instanceType = IfcEngine.x64.sdaiGetInstanceType(instance),
          attribute = IfcEngine.x64.sdaiGetAttrDefinition(instanceType, attributeName);

    return IfcEngine.x64.sdaiGetAttr(instance, attribute, valueType, out value);
}

Int64 localGetAttrBN(Int64 instance, byte[] attributeName, Int64 valueType, out double value)
{
    //
    //  This function is an alternative to the API call sdaiGetAttrBN()
    //  based on sdaiGetAttr().
    //
    //  Use of sdaiGetAttr() can lead to performance improvement compared to sdaiGetAttrBN().
    //
    Int64 instanceType = IfcEngine.x64.sdaiGetInstanceType(instance),
          attribute = IfcEngine.x64.sdaiGetAttrDefinition(instanceType, attributeName);

    return IfcEngine.x64.sdaiGetAttr(instance, attribute, valueType, out value);
}

Int64 localGetAttrBN(Int64 instance, byte[] attributeName, Int64 valueType, out IntPtr value)
{
    //
    //  This function is an alternative to the API call sdaiGetAttrBN()
    //  based on sdaiGetAttr().
    //
    //  Use of sdaiGetAttr() can lead to performance improvement compared to sdaiGetAttrBN().
    //
    Int64 instanceType = IfcEngine.x64.sdaiGetInstanceType(instance),
          attribute = IfcEngine.x64.sdaiGetAttrDefinition(instanceType, attributeName);

    return IfcEngine.x64.sdaiGetAttr(instance, attribute, valueType, out value);
}