sdaiPutAttr

...

Syntax

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

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

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

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

[DllImport(IFCEngineDLL, EntryPoint = "sdaiPutAttr")]
public static extern void sdaiPutAttr(Int64 instance, Int64 attribute, Int64 valueType, byte[] 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 sdaiPutAttr can be used.

Int64 localPutAttrBN(Int64 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().
    //
    Int64 instanceType = IfcEngine.x64.sdaiGetInstanceType(instance),
          attribute = IfcEngine.x64.sdaiGetAttrDefinition(instanceType, attributeName);

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