FormatOptions.Accuracy Property

The accuracy to which values will be rounded.


Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)

Syntax

C#

public double Accuracy { get; set; }

Property Value

Double
The accuracy. The default depends on the display unit.

Exceptions

ExceptionCondition
ArgumentException When setting this property: accuracy is not a valid accuracy for the display unit in this FormatOptions.
InvalidOperationException UseDefault is true in this FormatOptions.

Remarks

Formatted values will be rounded to the nearest multiple of the accuracy value.

Accuracy is specified in display units, not in Revit's internal units.

For DUT_GENERAL, the accuracy value is always 0.000001 and cannot be set to another value. DUT_GENERAL is a special display unit that always rounds to six decimal places and suppresses trailing zeros, roughly equivalent to DUT_FIXED with the accuracy set to 0.000001 and SuppressTrailingZeros set to true.

For other display units, a wide range of accuracy values may be specified. All values from 1.0e-12 to 1.0e12 will be accepted, but the specified value will be automatically adjusted to the nearest supported value if necessary. For best results, the accuracy value should be chosen to be compatible with the display unit:

See Also

Reference

FormatOptions Class
Autodesk.Revit.DB Namespace