Converts a value from one display unit to another, such as square feet to square meters.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2014
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- value
- Type: System Double
The value to convert.
- currentDisplayUnit
- Type: Autodesk.Revit.DB DisplayUnitType
The current display unit.
- desiredDisplayUnit
- Type: Autodesk.Revit.DB DisplayUnitType
The desired display unit.
Return Value
The converted value.Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | The given value for value is not finite -or- currentDisplayUnit is an invalid display unit. See UnitUtils.IsValidDisplayUnit(DisplayUnitType) and UnitUtils.GetValidDisplayUnits(). -or- desiredDisplayUnit is an invalid display unit. See UnitUtils.IsValidDisplayUnit(DisplayUnitType) and UnitUtils.GetValidDisplayUnits(). |
Autodesk.Revit.Exceptions ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |
Autodesk.Revit.Exceptions ArgumentsInconsistentException | currentDisplayUnit and desiredDisplayUnit have different dimensions. |