Hi there,
i am trying to close the active document and open a new empty document without providing a template. Both fails under Rhino 7 for Mac SR 7.17. The script to open a new empty document, which works fine on windows looks like this:
def NewEmptyDocument():
scriptcontext.doc.Create(None)
scriptcontext.doc.AdjustModelUnitSystem(Rhino.UnitSystem.Millimeters, False)
scriptcontext.doc.ModelAbsoluteTolerance = 0.01
scriptcontext.doc.ModelAngleToleranceDegrees = 1.0
return True
print NewEmptyDocument()
If i run this from the python editor on Mac, it returns True
, however, no document is created at all. If i run this on Windows, it closes the active document and opens a new one with the settings provided in the script.
If i pass a valid (template) file name and path to scriptcontext.doc.Create(file_path)
instead of using None
, nothing happens.
I understand that Rhino for Mac can open multiple documents. Therefore i tried to close the current document first by scripting the command _Close
. If i do this, Rhino for Mac asks me for a filepath which i do not know. The document i have open doesn’t have a file path as it has not been saved. If i run the command _Close
and click on “Done”, nothing happens.
How to close the active document and how can i open a new empty document on Mac using Python ?
thanks,
c.