Returns or sets the document's units system. See Rhino's DocumentProperties command (Units and Page Units windows) for details.
Rhino.UnitSystem ([intSystem [, blnScale [, blnModelUnits]]])
intSystem |
Optional. Number. The units system. The available units systems are as follows:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
blnScale |
Optional. Boolean. Scale existing geometry based on the new unit system. If not specified, any existing geometry is not scaled (False). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
blnModelUnits |
Optional. Boolean. Return or modify the document's model units (True) or the document's page units (False). The default is True. |
Number |
If intSystem is not specified, then the current unit system if successful. |
Number |
If intSystem is not specified, then the previous unit system if successful. |
Null |
If not successful, or on error. |
Const rhUnitMillimeters = 2
Const rhUnitInches = 8
Dim intSystem
intSystem = Rhino.UnitSystem
If intSystem = rhUnitMillimeters Then
Rhino.UnitSystem rhUnitInches, True
End If