AFAttributeTemplate.DefaultUOM Property
- 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 UOM DefaultUOM { get; set; }
Public Property DefaultUOM As UOM Get Set Dim instance As AFAttributeTemplate Dim value As UOM value = instance.DefaultUOM instance.DefaultUOM = value
public: virtual property UOM^ DefaultUOM { UOM^ get () sealed; void set (UOM^ value) sealed; }
abstract DefaultUOM : UOM with get, set override DefaultUOM : UOM with get, set
Property Value
Type: UOMThe default UOM for the value of the AFAttribute created from this template.
Implements
IAFAttributeDefaultUOM
Remarks
The default UOM defines the units of (a) the value returned from a call to the GetValue(UOM) method and (b) the value passed to the SetValue(Object, UOM) method if no UOM is specified for these method calls. If a different UOM is needed, then you can specify it in the call to these methods to override the default. The AFDataReference.UOM property is configured to be the actual UOM of the value in the external data source.
If the Trait property is set and it's IsUOMInherited is , then this property cannot be modified and will return the value of the attribute's parent DefaultUOM property.
Changing the value of this property changes the value of the DefaultUOM property of all attributes created from this template. If the current Type of this attribute template is not a numeric type or array of numeric types, then it will be changed to a System.Double.