Open new rhino file with python script


#1

Hi everyone,

Does anyone know how to start a new rhino file when I run the script.
so first thing I want the script to do is to create a new file without asking if I want to save the file already open and with no template for the new file.

this is because when I run the script in for testing I always need to open a new file to clear everything (layers, history, etc)

thanks so much
Francisco


#2

The following should do it…

–Mitch

import rhinoscriptsyntax as rs

#Note - this will close the document without saving!!
rs.DocumentModified(False)
rs.Command("_-New _None")