UnitUtils
A utility class of functions related to units.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.UnitUtils
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static class UnitUtilsThe UnitUtils type exposes the following members.
Methods
Name
Description
Public Method
Static Member
Convert
Converts a value from one unit to another, such as square feet to square meters.
Public Method
Static Member
ConvertFromInternalUnits
Converts a value from Revit’s internal units to a given unit.
Public Method
Static Member
ConvertToInternalUnits
Converts a value from a given unit to Revit’s internal units.
Public Method
Static Member
GetAllDisciplines
Gets the identifiers of all available disciplines.
Public Method
Static Member
GetAllMeasurableSpecs
Gets the identifiers of all available measurable specs.
Public Method
Static Member
GetAllUnits
Gets the identifiers of all available units.
Public Method
Static Member
GetDiscipline
Gets the discipline for a given measurable spec.
Public Method
Static Member
GetTypeCatalogStringForSpec
Gets the string used in type catalogs to identify a given measurable spec.
Public Method
Static Member
GetTypeCatalogStringForUnit
Gets the string used in type catalogs to identify a given unit.
Public Method
Static Member
GetValidUnits
Gets the identifiers of all valid units for a given measurable spec.
Public Method
Static Member
IsMeasurableSpec
Checks whether a ForgeTypeId identifies a spec associated with units of measurement.
Public Method
Static Member
IsSymbol
Checks whether a ForgeTypeId identifies a symbol.
Public Method
Static Member
IsUnit
Checks whether a ForgeTypeId identifies a unit.
Public Method
Static Member
IsValidUnit
Checks whether a unit is valid for a given measurable spec.