Returns or sets the document's units system. See Rhino's DocumentProperties command (Units and Page Units windows) for details.
rhinoscriptsyntax.UnitSystem (unit_system=None, scale=False, in_model_units=True)
rhinoscript.document.UnitSystem (unit_system=None, scale=False, in_model_units=True)
unit_system |
Optional. Number. The units system. The available units systems are as follows:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
scale |
Optional. Boolean. Scale existing geometry based on the new unit system. If not specified, any existing geometry is not scaled (False). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
in_model_units |
Optional. Boolean. Return or modify the document's model units (True) or the document's page units (False). The default is True. |
Number |
If unit_system is not specified, then the current unit system if successful. |
Number |
If unit_system is not specified, then the previous unit system if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
rhUnitMillimeters = 2
rhUnitInches = 8
current_system = rs.UnitSystem()
if current_system==rhUnitMillimeters:
rs.UnitSystem(rhUnitInches, True)