2023 Class
Changes 3
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, ForgeTypeId) The converted value. Converts a value from Revit's internal units to a given unit.
M Convert(Double, ForgeTypeId, ForgeTypeId) The converted value. Converts a value from one unit to another, such as square feet to square meters.
M ConvertToInternalUnits(Double, ForgeTypeId) The converted value. Converts a value from a given unit to Revit's internal units.
M GetAllDisciplines() The discipline identifiers. Gets the identifiers of all available disciplines.
M GetAllMeasurableSpecs() The spec identifiers. Gets the identifiers of all available measurable specs.
M GetAllUnits() The unit identifiers. Gets the identifiers of all available units.
M GetDiscipline(ForgeTypeId) ForgeTypeId Gets the discipline for a given measurable spec.
M GetTypeCatalogStringForSpec(ForgeTypeId) string Gets the string used in type catalogs to identify a given measurable spec.
M GetTypeCatalogStringForUnit(ForgeTypeId) string Gets the string used in type catalogs to identify a given unit.
M GetValidUnits(ForgeTypeId) IList<ForgeTypeId> Gets the identifiers of all valid units for a given measurable spec.
M IsMeasurableSpec(ForgeTypeId) bool Checks whether a ForgeTypeId identifies a spec associated with units of measurement.
M IsSymbol(ForgeTypeId) bool Checks whether a ForgeTypeId identifies a symbol.
M IsUnit(ForgeTypeId) bool Checks whether a ForgeTypeId identifies a unit.
M IsValidUnit(ForgeTypeId, ForgeTypeId) bool Checks whether a unit is valid for a given measurable spec.