sdaiGetAttr

...

Syntax

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

[DllImport(IFCEngineDLL, EntryPoint = "sdaiGetAttr")]
public static extern Int64 sdaiGetAttr(Int64 instance, Int64 attribute, Int64 valueType, out  Int64 value);

[DllImport(IFCEngineDLL, EntryPoint = "sdaiGetAttr")]
public static extern Int64 sdaiGetAttr(Int64 instance, Int64 attribute, Int64 valueType, out double value);

[DllImport(IFCEngineDLL, EntryPoint = "sdaiGetAttr")]
public static extern Int64 sdaiGetAttr(Int64 instance, Int64 attribute, Int64 valueType, out IntPtr value);    

Property instance

Size: 64 bit / 8 byte (value)
Handle of an instance within an IFC file, for example #31313 = IFCWALLSTANDARDCASE(...)

Property attribute

Size: 64 bit / 8 byte (value)
A handle to the an attribute of a certain entity, for example attribute Name of entity IFCROOT.

Property valueType

Size: 64 bit / 8 byte (value)
Type of the value, for example sdaiSTRING, sdaiINSTANCE, sdaiREAL, ...

Property value

Size: 64 bit / 8 byte (reference)
Placeholder for the information, formatting depending on defined valueType.

Examples

Here you can find code snippits that show how the API call sdaiGetAttr 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);
}