AFAttribute.SetValue Method (Object, Object, UOM)
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Note: This API is now obsolete.
This method sets the value for an attribute based upon the data reference configuration
with a default timestamp and the specified unit-of-measure.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[BrowsableAttribute(false)] [ObsoleteAttribute("This method has been replaced by SetValue(AFCase,object,UOM) or SetValue(object,UOM).")] public void SetValue( Object context, Object newValue, UOM specifiedUOM )
<BrowsableAttribute(false)> <ObsoleteAttribute("This method has been replaced by SetValue(AFCase,object,UOM) or SetValue(object,UOM).")> Public Sub SetValue ( context As Object, newValue As Object, specifiedUOM As UOM ) Dim instance As AFAttribute Dim context As Object Dim newValue As Object Dim specifiedUOM As UOM instance.SetValue(context, newValue, specifiedUOM)
public: [BrowsableAttribute(false)] [ObsoleteAttribute(L"This method has been replaced by SetValue(AFCase,object,UOM) or SetValue(object,UOM).")] void SetValue( Object^ context, Object^ newValue, UOM^ specifiedUOM )
[<BrowsableAttribute(false)>] [<ObsoleteAttribute("This method has been replaced by SetValue(AFCase,object,UOM) or SetValue(object,UOM).")>] member SetValue : context : Object * newValue : Object * specifiedUOM : UOM -> unit
Parameters
- context
- Type: SystemObject
The case context to be used when setting the attribute's value. The value will added to the case's result set as an output. Invoking AFCase.Publish will write all result set outputs to the data references which support it. - newValue
- Type: SystemObject
The new value for the attribute. If the specified value is DBNull.Value, then the attribute's value will be reset back to using the default value from the Template if the template is defined or to the default value for its Type if the template is not defined. - specifiedUOM
- Type: OSIsoft.AF.UnitsOfMeasureUOM
The unit of measure of the newValue parameter. If , then the unit of measure may be specified as part of the value in string format (e.g. "100.0 ft"). Otherwise, the unit of measure of the value is assumed to be in terms of the attribute's DefaultUOM property.
Remarks
The method is obsolete and has been replaced by the
SetValue(AFCase, object, UOM) or
SetValue(object, UOM) methods.
Version Information
AFSDK
Obsolete (compiler warning) in 3.1.1Obsolete (compiler warning) in 3.1.0
Obsolete (compiler warning) in 3.0.2
Obsolete (compiler warning) in 3.0.1
Obsolete (compiler warning) in 3.0.0
Obsolete (compiler warning) in 2.10.11
Obsolete (compiler warning) in 2.10.5
Obsolete (compiler warning) in 2.10.0
Obsolete (compiler warning) in 2.10
Obsolete (compiler warning) in 2.9.5
Obsolete (compiler warning) in 2.9
Obsolete (compiler warning) in 2.8.5
Obsolete (compiler warning) in 2.8
Obsolete (compiler warning) in 2.7.5
Obsolete (compiler warning) in 2.7
Obsolete (compiler warning) in 2.6
Obsolete (compiler warning) in 2.5
Obsolete (compiler warning) in 2.4