Revit 2026 API
Format |
Indicates if trailing zeros after the decimal point should be
suppressed.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public bool SuppressTrailingZeros { get; set; }
Public Property SuppressTrailingZeros As Boolean Get Set
public: property bool SuppressTrailingZeros { bool get (); void set (bool value); }
member SuppressTrailingZeros : bool with get, set
Property Value
BooleanTrue if trailing zeros should be suppressed, false otherwise. The default is false.
| Exception | Condition |
|---|---|
| InvalidOperationException | UseDefault is true in this FormatOptions. -or- When setting this property: SuppressTrailingZeros was set to true but trailing zeros cannot be suppressed for the display unit in this FormatOptions. |
This property is applicable to display units which are formatted as a decimal number. It is not applicable to the following display units which have specialized formatting:
- DUT_GENERAL
- DUT_FEET_FRACTIONAL_INCHES
- DUT_FRACTIONAL_INCHES
- DUT_METERS_CENTIMETERS
- DUT_DEGREES_AND_MINUTES
- DUT_RISE_OVER_INCHES
- DUT_RISE_OVER_120_INCHES
- DUT_RISE_OVER_FOOT
- DUT_RISE_OVER_10_FEET
When SuppressTrailingZeros is true, trailing zeros to the right of the decimal point will not be displayed. For example, 1.200 will be displayed as 1.2.
Trailing zeros are always suppressed for DUT_GENERAL, and the SuppressTrailingZeros property is not used.
See Also