Format
Version comparisonPer-version detail
Click a version below to see what changed in that release vs your current frame (2021).
Not present in: 2022, 2023, 2024, 2025, 2025.3, 2026, 2027
2021
current
UnitFormatUtils.Format(Units, UnitType, Double, Boolean, Boolean)
Became obsolete in 2021: This method is deprecated in Revit 2021 and may be removed in a future version of Revit. Please use the `Format(Units, ForgeTypeId, double, bool)` overload instead.
| units | Units | The units formatting settings, typically obtained from <a href="/2021/9ed56178-e9ae-b4bc-1c0e-e6a867ae3557">Document.GetUnits()</a>. |
| unitType | UnitType | The unit type of the value to format. |
| value | Double | The value to format, in Revit's internal units. |
| maxAccuracy | Boolean | True if the value should be rounded to an increased accuracy level appropriate for editing or understanding the precise value stored in the model. False if the accuracy specified by the FormatOptions should be used, appropriate for printed drawings. |
| forEditing | Boolean | True if the formatting should be modified as necessary so that the formatted string can be successfully parsed, for example by suppressing digit grouping. False if unmodified settings should be used, suitable for display only. |