sdaiGetAttrDefinition

...

Syntax

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

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

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

Property entity

Size: 64 bit / 8 byte (value)
Handle of an entity (schema item/class), for example IFCWALLSTANDARDCASE as defined in IFC4.exp.

Property attributeName

Size: 64 bit / 8 byte (reference)
Name of the attribute, for example Name of IFCROOT as defined in IFC4.exp.

Examples

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

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);
}