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, DisplayUnitType) | The converted value. | Converts a value from Revit's internal units to a given display unit. |
| ConvertFromInternalUnits(Double, ForgeTypeId) | The converted value. | Converts a value from Revit's internal units to a given unit. |
| Convert(Double, DisplayUnitType, DisplayUnitType) | The converted value. | Converts a value from one display unit to another, such as square feet to square meters. |
| Convert(Double, ForgeTypeId, ForgeTypeId) | The converted value. | Converts a value from one unit to another, such as square feet to square meters. |
| ConvertToInternalUnits(Double, DisplayUnitType) | The converted value. | Converts a value from a given display unit to Revit's internal units. |
| ConvertToInternalUnits(Double, ForgeTypeId) | The converted value. | Converts a value from a given unit to Revit's internal units. |
| GetAllSpecs() | The spec identifiers. | Gets the identifiers of all available specs. |
| GetAllUnits() | The unit identifiers. | Gets the identifiers of all available units. |
| GetDisplayUnitType(ForgeTypeId) | DisplayUnitType | Gets the DisplayUnitType value corresponding to the given unit identifier. |
| GetSpecTypeId(UnitType) | ForgeTypeId | Gets the ForgeTypeId identifying the spec corresponding to the given unit type. |
| GetSymbolTypeId(UnitSymbolType) | ForgeTypeId | Gets the ForgeTypeId identifying the given symbol. |
| GetTypeCatalogStringForSpec(ForgeTypeId) | string | Gets the string used in type catalogs to identify a given spec. |
| GetTypeCatalogStringForUnit(ForgeTypeId) | string | Gets the string used in type catalogs to identify a given unit. |
| GetTypeCatalogString(DisplayUnitType) | string | Gets the string used in type catalogs to identify a given display unit. |
| GetTypeCatalogString(UnitType) | string | Gets the string used in type catalogs to identify a given unit type. |
| GetUnitGroup(ForgeTypeId) | The unit group. | Gets the unit group for a given spec. |
| GetUnitGroup(UnitType) | The unit group. | Gets the unit group for a given unit type. |
| GetUnitSymbolType(ForgeTypeId) | UnitSymbolType | Gets the UnitSymbolType value corresponding to the given symbol identifier. |
| GetUnitTypeId(DisplayUnitType) | ForgeTypeId | Gets the ForgeTypeId identifying the given unit. |
| GetUnitType(ForgeTypeId) | UnitType | Gets the UnitType value corresponding to the given spec identifier. |
| GetValidDisplayUnits() | IList<DisplayUnitType> | Gets all valid display units. |
| GetValidDisplayUnits(UnitType) | IList<DisplayUnitType> | Gets all valid display units for a given unit type. |
| GetValidUnits(ForgeTypeId) | IList<ForgeTypeId> | Gets the identifiers of all valid units for a given spec. |
| GetValidUnitTypes() | IList<UnitType> | Gets all valid unit types. |
| IsSpec(ForgeTypeId) | bool | Checks whether a ForgeTypeId identifies a spec. |
| IsSymbol(ForgeTypeId) | bool | Checks whether a ForgeTypeId identifies a symbol. |
| IsUnit(ForgeTypeId) | bool | Checks whether a ForgeTypeId identifies a unit. |
| IsValidDisplayUnit(DisplayUnitType) | bool | Checks whether a display unit is valid. |
| IsValidDisplayUnit(UnitType, DisplayUnitType) | bool | Checks whether a display unit is valid for a given unit type. |
| IsValidUnit(ForgeTypeId, ForgeTypeId) | bool | Checks whether a unit is valid for a given spec. |
| IsValidUnitType(UnitType) | bool | Checks whether a unit type is valid. |