2020 Class
Changes 8
C

UnitUtils

Description:
A utility class of functions related to units.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.UnitUtils
public static class UnitUtils
Name Return Type Description
M ConvertFromInternalUnits(Double, DisplayUnitType) The converted value. Converts a value from Revit's internal units to a given display unit.
M Convert(Double, DisplayUnitType, DisplayUnitType) The converted value. Converts a value from one display unit to another, such as square feet to square meters.
M ConvertToInternalUnits(Double, DisplayUnitType) The converted value. Converts a value from a given display unit to Revit's internal units.
M GetTypeCatalogString(DisplayUnitType) string Gets the string used in type catalogs to identify a given display unit.
M GetTypeCatalogString(UnitType) string Gets the string used in type catalogs to identify a given unit type.
M GetUnitGroup(UnitType) The unit group. Gets the unit group for a given unit type.
M GetValidDisplayUnits() IList<DisplayUnitType> Gets all valid display units.
M GetValidDisplayUnits(UnitType) IList<DisplayUnitType> Gets all valid display units for a given unit type.
M GetValidUnitTypes() IList<UnitType> Gets all valid unit types.
M IsValidDisplayUnit(DisplayUnitType) bool Checks whether a display unit is valid.
M IsValidDisplayUnit(UnitType, DisplayUnitType) bool Checks whether a display unit is valid for a given unit type.
M IsValidUnitType(UnitType) bool Checks whether a unit type is valid.