IAFAttribute.DisplayDigits Property
- Last UpdatedNov 18, 2025
- 3 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
int DisplayDigits { get; set; }
Property DisplayDigits As Integer Get Set Dim instance As IAFAttribute Dim value As Integer value = instance.DisplayDigits instance.DisplayDigits = value
property int DisplayDigits { int get (); void set (int value); }
abstract DisplayDigits : int with get, set
Property Value
Type: Int32The value must be between -20 and 10 when setting a new value. A zero or a positive number indicates the number of digits to display to the right of the decimal point. A negative number indicates the number of significant digits to display. In this case, the absolute value is the number of significant digits.
The default value is -5 (five significant digits), which is appropriate for most purposes. 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.DisplayDigits property also changes the value of this property. If the attribute was NOT created from a template and is not a dynamic attribute, then this property can be modified. For dynamic attributes (see IsDynamic), this value cannot be set and the value is always returned directly from the defined DataReference.
If a Trait is defined, then the value of the attribute's display digits is defined by the AllowDisplayDigits setting.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | This exception is thrown when attempting to set the value outside the valid range of -20 to 10. |