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

AF SDK Reference

AFValue Constructor (AFAttribute, Object, AFTime, UOM, AFValueStatus)

AFValue Constructor (AFAttribute, Object, AFTime, UOM, AFValueStatus)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFValue Constructor (AFAttribute, Object, AFTime, UOM, AFValueStatus)
This is the constructor for an AFValue object which specifies the Attribute for the value and all the properties of the value.

Namespace:  OSIsoft.AF.Asset
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public AFValue(
	AFAttribute attribute,
	Object newValue,
	AFTime timestamp,
	UOM uom,
	AFValueStatus status
)
Public Sub New ( 
	attribute As AFAttribute,
	newValue As Object,
	timestamp As AFTime,
	uom As UOM,
	status As AFValueStatus
)

Dim attribute As AFAttribute
Dim newValue As Object
Dim timestamp As AFTime
Dim uom As UOM
Dim status As AFValueStatus

Dim instance As New AFValue(attribute, 
	newValue, timestamp, uom, status)
public:
AFValue(
	AFAttribute^ attribute, 
	Object^ newValue, 
	AFTime timestamp, 
	UOM^ uom, 
	AFValueStatus status
)
new : 
        attribute : AFAttribute * 
        newValue : Object * 
        timestamp : AFTime * 
        uom : UOM * 
        status : AFValueStatus -> AFValue

Parameters

attribute
Type: OSIsoft.AF.AssetAFAttribute
The AFAttribute to be associated with the new value.
newValue
Type: SystemObject
The new value to be assigned to the Value property.
timestamp
Type: OSIsoft.AF.TimeAFTime
The timestamp associated with the new value.
uom
Type: OSIsoft.AF.UnitsOfMeasureUOM
The UOM of the specified value.
status
Type: OSIsoft.AF.AssetAFValueStatus
The status which indicates whether the new value is a good or bad status, substituted, questionable, or annotated.

Exceptions

ExceptionCondition
InvalidCastException This exception is thrown if the type of newValue does not support specifying a UOM.

Remarks

This constructor is useful for creating an AFValue to be used with the UpdateValues Overload method. The AFValue is associated with the specified Attribute and all properties of the new value are set according to the specified parameters.

Version Information

AFSDK


See Also

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