sdaiGetAttrDefinition

...

Syntax

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

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

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

Property entity

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

Property attributeName

Size: 32 bit / 4 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.

Int32 localGetAttrBN(Int32 instance, byte[] attributeName, Int32 valueType, out Int32 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().
    //
    Int32 instanceType = IfcEngine.x86.sdaiGetInstanceType(instance),
          attribute = IfcEngine.x86.sdaiGetAttrDefinition(instanceType, attributeName);

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

Int32 localGetAttrBN(Int32 instance, byte[] attributeName, Int32 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().
    //
    Int32 instanceType = IfcEngine.x86.sdaiGetInstanceType(instance),
          attribute = IfcEngine.x86.sdaiGetAttrDefinition(instanceType, attributeName);

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

Int32 localGetAttrBN(Int32 instance, byte[] attributeName, Int32 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().
    //
    Int32 instanceType = IfcEngine.x86.sdaiGetInstanceType(instance),
          attribute = IfcEngine.x86.sdaiGetAttrDefinition(instanceType, attributeName);

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