The units and display format used to format values.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2014
Syntax
C# |
---|
[ObsoleteAttribute("This property is deprecated in Revit 2021 and may be removed in a future version of Revit. Please use the `GetUnitTypeId()` and `SetUnitTypeId(ForgeTypeId)` methods instead.")] public DisplayUnitType DisplayUnits { get; set; } |
Visual Basic |
---|
<ObsoleteAttribute("This property is deprecated in Revit 2021 and may be removed in a future version of Revit. Please use the `GetUnitTypeId()` and `SetUnitTypeId(ForgeTypeId)` methods instead.")> _ Public Property DisplayUnits As DisplayUnitType Get Set |
Visual C++ |
---|
[ObsoleteAttribute(L"This property is deprecated in Revit 2021 and may be removed in a future version of Revit. Please use the `GetUnitTypeId()` and `SetUnitTypeId(ForgeTypeId)` methods instead.")] public: property DisplayUnitType DisplayUnits { DisplayUnitType get (); void set (DisplayUnitType value); } |
Field Value
The display unit.
Remarks
Most display units represent simple units like meters, square feet,
or degrees, and are formatted as decimal numbers. Some display
units represent specialized formatting methods like "feet and
fractional inches" or "degrees, minutes and seconds".
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | When setting this property: displayUnit is an invalid display unit. See UnitUtils.IsValidDisplayUnit(DisplayUnitType) and UnitUtils.GetValidDisplayUnits(). |
Autodesk.Revit.Exceptions..::..ArgumentOutOfRangeException | When setting this property: A value passed for an enumeration argument is not a member of that enumeration |
Autodesk.Revit.Exceptions..::..InvalidOperationException | UseDefault is true in this FormatOptions. |