sdaiPutAttr

...

Syntax

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

[DllImport(IFCEngineDLL, EntryPoint = "sdaiPutAttr")]
public static extern void sdaiPutAttr(Int32 instance, Int32 attribute, Int32 valueType, ref  Int32 value);

[DllImport(IFCEngineDLL, EntryPoint = "sdaiPutAttr")]
public static extern void sdaiPutAttr(Int32 instance, Int32 attribute, Int32 valueType, ref double value);

[DllImport(IFCEngineDLL, EntryPoint = "sdaiPutAttr")]
public static extern void sdaiPutAttr(Int32 instance, Int32 attribute, Int32 valueType, string value);

[DllImport(IFCEngineDLL, EntryPoint = "sdaiPutAttr")]
public static extern void sdaiPutAttr(Int32 instance, Int32 attribute, Int32 valueType, byte[] value);    

Property instance

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

Property attribute

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

Property valueType

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

Property value

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

Examples

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

Int32 localPutAttrBN(Int32 instance, byte[] attributeName)
{
    //
    //  This function is an alternative to the API call sdaiCreateAggrBN()
    //  based on sdaiCreateAggr().
    //
    //  Use of sdaiCreateAggr() can lead to performance improvement compared to sdaiCreateAggrBN().
    //
    Int32 instanceType = IfcEngine.x86.sdaiGetInstanceType(instance),
          attribute = IfcEngine.x86.sdaiGetAttrDefinition(instanceType, attributeName);

    return IfcEngine.x86.sdaiPutAttr(instance, attribute);
}