UnitUtils.ConvertToInternalUnits
Description:
Converts a value from a given display unit to Revit's internal units.
Converts a value from a given display unit to Revit's internal units.
public static double ConvertToInternalUnits(
double value,
DisplayUnitType displayUnit
)
-
valueThe value to convert.
-
displayUnitThe value's 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