UnitUtils
Description:
A utility class of functions related to units.
A utility class of functions related to units.
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.UnitUtils
System.Object
Autodesk.Revit.DB.UnitUtils
public static class UnitUtils
| Name | Return Type | Description |
|---|---|---|
| ConvertFromInternalUnits(Double, ForgeTypeId) | The converted value. | Converts a value from Revit's internal units to a given unit. |
| Convert(Double, ForgeTypeId, ForgeTypeId) | The converted value. | Converts a value from one unit to another, such as square feet to square meters. |
| ConvertToInternalUnits(Double, ForgeTypeId) | The converted value. | Converts a value from a given unit to Revit's internal units. |
| GetAllDisciplines() | The discipline identifiers. | Gets the identifiers of all available disciplines. |
| GetAllMeasurableSpecs() | The spec identifiers. | Gets the identifiers of all available measurable specs. |
| GetAllUnits() | The unit identifiers. | Gets the identifiers of all available units. |
| GetDiscipline(ForgeTypeId) | ForgeTypeId | Gets the discipline for a given measurable spec. |
| GetTypeCatalogStringForSpec(ForgeTypeId) | string | Gets the string used in type catalogs to identify a given measurable spec. |
| GetTypeCatalogStringForUnit(ForgeTypeId) | string | Gets the string used in type catalogs to identify a given unit. |
| GetValidUnits(ForgeTypeId) | IList<ForgeTypeId> | Gets the identifiers of all valid units for a given measurable spec. |
| IsMeasurableSpec(ForgeTypeId) | bool | Checks whether a ForgeTypeId identifies a spec associated with units of measurement. |
| IsSymbol(ForgeTypeId) | bool | Checks whether a ForgeTypeId identifies a symbol. |
| IsUnit(ForgeTypeId) | bool | Checks whether a ForgeTypeId identifies a unit. |
| IsValidUnit(ForgeTypeId, ForgeTypeId) | bool | Checks whether a unit is valid for a given measurable spec. |