Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFAttribute.SetValue Method (AFCase, AFValue, UOM)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFAttribute.SetValue Method (AFCase, AFValue, UOM)

Note: This API is now obsolete.

This method sets the value for an attribute based into the result set of the specified AFCase context using the specified AFValue object. Values written into the case can be subsequently output to associated data references by invoking AFCase.Publish method.

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,AFValue) or SetValue(AFValue).")]
public void SetValue(
	AFCase context,
	AFValue newValue,
	UOM specifiedUOM
)
<BrowsableAttribute(false)>
<ObsoleteAttribute("This method has been replaced by SetValue(AFCase,AFValue) or SetValue(AFValue).")>
Public Sub SetValue ( 
	context As AFCase,
	newValue As AFValue,
	specifiedUOM As UOM
)

Dim instance As AFAttribute
Dim context As AFCase
Dim newValue As AFValue
Dim specifiedUOM As UOM

instance.SetValue(context, newValue, specifiedUOM)
public:
[BrowsableAttribute(false)]
[ObsoleteAttribute(L"This method has been replaced by SetValue(AFCase,AFValue) or SetValue(AFValue).")]
void SetValue(
	AFCase^ context, 
	AFValue^ newValue, 
	UOM^ specifiedUOM
)
[<BrowsableAttribute(false)>]
[<ObsoleteAttribute("This method has been replaced by SetValue(AFCase,AFValue) or SetValue(AFValue).")>]
member SetValue : 
        context : AFCase * 
        newValue : AFValue * 
        specifiedUOM : UOM -> unit 

Parameters

context
Type: OSIsoft.AF.AnalysisAFCase
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: OSIsoft.AF.AssetAFValue
The new AFValue object for the attribute's value. If the AFValue.Value is DBNull.Value and the context is , then the attribute's value will be reset back to using the default value from the template. A value of DBNull.Value is not allowed if the context is specified.
specifiedUOM
Type: OSIsoft.AF.UnitsOfMeasureUOM
The unit of measure of the newValue parameter. It will override the UOM that may also be specified in the AFValue. 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, AFValue, UOM) or SetValue(AFValue, UOM) methods. The UOM parameter in this method is now redundant as it is included in the AFValue object.

Version Information

AFSDK

Obsolete (compiler warning) in 3.1.1
Obsolete (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

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in