revitron.unit¶
The unit module and its Unit class provide little helper for handling units in Revit.
Classes:
|
The Unit class contains helpers for handling units. |
- class Unit[source]¶
Bases:
object
The Unit class contains helpers for handling units.
Methods:
convertToInternalUnit
(value, unit)Convert a given value from a given unit into Revit's internal unit.
- static convertToInternalUnit(value, unit)[source]¶
Convert a given value from a given unit into Revit’s internal unit.
- Parameters
value (mixed) – A number or string value. Strings are converted to floats automatically.
unit (object) – A Revit
DisplayUnitType
orForgeTypeId
object
- Returns
The converted number
- Return type
number