UnitUtils.ConvertFromInternalUnits
Description:
Converts a value from Revit's internal units to a given display unit.
Converts a value from Revit's internal units to a given display unit.
Overloads (2):
ConvertFromInternalUnits(Double,DisplayUnitType)
[ObsoleteAttribute("This method is deprecated in Revit 2021 and may be removed in a future version of Revit. Please use the `ConvertFromInternalUnits(double, ForgeTypeId)` overload instead.")]
public static double ConvertFromInternalUnits(
double value,
DisplayUnitType displayUnit
)
-
DoublevalueThe value to convert.
-
displayUnitThe desired display unit.
Return Value
The converted value.
The converted value.
-
The given value for value is not finite -or- displayUnit is an invalid display unit. See UnitUtils.IsValidDisplayUnit(DisplayUnitType) and UnitUtils.GetValidDisplayUnits().
-
A value passed for an enumeration argument is not a member of that enumeration