sdaiGetAttrDefinition

...

Syntax

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

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

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

Property entity

Size: 64 bit / 8 byte (value)
...

Property attributeName

Size: 64 bit / 8 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.sdaiGetInstanceType(instance),
          attribute = ifcengine.sdaiGetAttrDefinition(instanceType, attributeName);

    return ifcengine.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.sdaiGetInstanceType(instance),
          attribute = ifcengine.sdaiGetAttrDefinition(instanceType, attributeName);

    return ifcengine.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.sdaiGetInstanceType(instance),
          attribute = ifcengine.sdaiGetAttrDefinition(instanceType, attributeName);

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