AFValue Constructor (Object, UOM)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
This is the constructor for an AFValue object which specifies
the value and unit of measure and uses defaults for all the other properties.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFValue( Object newValue, UOM uom )
Public Sub New ( newValue As Object, uom As UOM ) Dim newValue As Object Dim uom As UOM Dim instance As New AFValue(newValue, uom)
public: AFValue( Object^ newValue, UOM^ uom )
new : newValue : Object * uom : UOM -> AFValue
Parameters
- newValue
- Type: SystemObject
The new value to be assigned to the Value property. - uom
- Type: OSIsoft.AF.UnitsOfMeasureUOM
The UOM of the new value.
Exceptions
| Exception | Condition |
|---|---|
| InvalidCastException | This exception is thrown if the type of newValue does not support specifying a UOM. |
Remarks
The default value for the Timestamp property is MinValue.
The default value for the Status property sets the IsGood
flag and no other status bits are set.