UnitUtils
Description:
A utility class of functions related to units.
A utility class of functions related to units.
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. |
| Convert(Double, DisplayUnitType, DisplayUnitType) | The converted value. | Converts a value from one display 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. |
| 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(UnitType) | The unit group. | Gets the unit group for a given unit type. |
| GetValidDisplayUnits() | IList<DisplayUnitType> | Gets all valid display units. |
| GetValidDisplayUnits(UnitType) | IList<DisplayUnitType> | Gets all valid display units for a given unit type. |
| GetValidUnitTypes() | IList<UnitType> | Gets all valid unit types. |
| 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. |
| IsValidUnitType(UnitType) | bool | Checks whether a unit type is valid. |