AFAttribute.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 AFAttribute 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 attribute's value.
Implements
IAFAttributeDefaultUOM
Remarks
The default UOM defines the units of (a) the value returned from a call to the GetValue Overload methods and (b) the value passed to the SetValue Overload methods 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 this attribute was created from an AFAttributeTemplate, then the value of this property is defined by the template and cannot be changed. In this case, changing the AFAttributeTemplate.DefaultUOM property also changes the value of this property. If the attribute was NOT created from a template, then this property can be modified. Modifying this property will not convert the associated value, or any previous values already saved. If the current Type of this attribute is not a numeric type or array of numeric types, then it will be changed to a System.Double.