csykes
(CSykes)
1
I’ve found that scripting -New in Rhino doesn’t seem to work headlessly as I would expect.
If the document is not modified, the below works great!
RhinoApp.RunScript($"-New N", true);
If the document has been modified, the below happens;
RhinoApp.RunScript($"-New", true);

Is there a workaround to this I can use code for. My goal is to open a new document with any template or no template
– cs
You need to set the document modified flag to false.
C#
Rhino.RhinoDoc.ActiveDoc.Modified = false;
Python:
rs.DocumentModified(False)
1 Like
csykes
(CSykes)
3
I see there is RhinoDoc.Create
but this requires a click of “Do not Save”.
– cs
csykes
(CSykes)
4
IT HAS A SETTER? Ok I’ll try this, thanks @Mahdiyar
csykes
(CSykes)
5
@dale would it be possible to make -New
work headlessly even with modified Documents?