DisplayUnits Property


The units and display format used to format values.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2014

Syntax

C#
public DisplayUnitType DisplayUnits { get; set; }
Visual Basic
Public Property DisplayUnits As DisplayUnitType
	Get
	Set
Visual C++
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.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →