AFValues.Convert Method (UOMGroup)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFValues Convert( UOMGroup uomGroup = null )
Public Function Convert ( Optional uomGroup As UOMGroup = Nothing ) As AFValues Dim instance As AFValues Dim uomGroup As UOMGroup Dim returnValue As AFValues returnValue = instance.Convert(uomGroup)
public: AFValues^ Convert( UOMGroup^ uomGroup = nullptr )
member Convert : ?uomGroup : UOMGroup (* Defaults: let _uomGroup = defaultArg uomGroup null *) -> AFValues
Parameters
- uomGroup (Optional)
- Type: OSIsoft.AF.UnitsOfMeasureUOMGroup
The UOMGroup to use for the desired mapped UOM to be used for converting each Value in the list. If this parameter is , then the UOMGroup specified by the DisplayUOMGroup will be used.
Return Value
Type: AFValuesReturns the existing AFValue if the current UOM is not defined or a mapping does not exist for the current UOM. Returns a new AFValues list with each AFValue in the list converted to the mapped UOM specified by the uomGroup.
Remarks
If the UOM for a value is not set or a mapping does not exist for the UOM in the uomGroup, then no conversion takes place and the current value will be returned in the new AFValues list.
If the Value is an Array, then each item in the array will be converted using the mapping defined by the specified uomGroup.