Click or drag to resize

IAttributeDatabaseFindAddOrUpdateAttributeValue Method

Find, add or update an attribute value.

If an attribute value with the specified id does not exist, then the function 'create' is called to create a new attribute value. If the 'create' function is null then no new attribute value is added.

If an attribute value with the specified id already exists, then the function 'update' (if not null) is called to update the attribute value.

Namespace:  Demo3D.PLC.Comms.AttrDb
Assembly:  PLC (in PLC.dll) Version: 15.0.2.11458
Syntax
C#
AttributeValue? FindAddOrUpdateAttributeValue(
	uint attributeId,
	Func<AttributeValue>? create,
	Action<AttributeValue>? update,
	out bool? created
)

Parameters

attributeId
Type: SystemUInt32
The attribute id to find.
create
Type: SystemFuncAttributeValue
A function to create a new attribute value (or null).
update
Type: SystemActionAttributeValue
A function to update the existing attribute value (or null).
created
Type: SystemBoolean
True if the value was created.

Return Value

Type: AttributeValue
The new/existing attribute (or null).
See Also