Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFAttributeTemplate.DisplayDigits Property

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFAttributeTemplate.DisplayDigits Property
The DisplayDigits property controls the format of numeric values on displays and in reports.

Namespace:  OSIsoft.AF.Asset
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public int DisplayDigits { get; set; }
Public Property DisplayDigits As Integer
	Get
	Set

Dim instance As AFAttributeTemplate
Dim value As Integer

value = instance.DisplayDigits

instance.DisplayDigits = value
public:
virtual property int DisplayDigits {
	int get () sealed;
	void set (int value) sealed;
}
abstract DisplayDigits : int with get, set
override DisplayDigits : int with get, set

Property Value

Type: Int32

The 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.

Implements

IAFAttributeDisplayDigits

Exceptions

ExceptionCondition
ArgumentOutOfRangeException This exception is thrown when attempting to set the value outside the valid range of -20 to 10.

Remarks

Client applications can use the value of this property to control the format of numeric values on display and in reports. This value does not affect the formatting of non-numeric values. The AFValueDisplayValue helper method can be used to convert a value to be displayed based upon the display digits setting.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10

See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in