Save/Open Issue in Command Files

I’m pretty sure I’m a corner case, here, but I’m having some issue with Command files. I have a series of command files for a given geometry. Command file 1 creates the geometry and saves it with the File Name 1. The rest of the command files open “File Name 1” and save as a different file (say “File Name N”).

The save command I’m using at the end of each command file is
-save Version 7 SaveSmall <file name>

The issue arises when I execute the next command file and use “-open” to open File Name 1. Since I’m running Rhino 8 and save as a Version 7 file, Rhino still considers the session unsaved/dirty. So when the next command issues the “-open” command, it considers prompts “Save changes to ?” This prompt would not appear if executing the same script on Rhino 7.

We have a team with a mix of Rhino 7 and 8, so Ideally I want:

  1. To save files as Rhino 7 files
  2. The command scripts to behave the same in Rhino 7 and 8.
  3. A way to suppress these prompts in command files or to say, “yes I want to trash any current changes”

To boil it down, this script behaves differently in Rhino 7 and 8 at the open command.

-line 0,0,0 1,0,0
-save Version 7 SaveSmall temp_file.3dm
-open temp_file.3dm

I’m not above writing a custom save or open command in RhinoCommon, but I’m hoping there is an easier way.

Can you send me your _systeminfo?
It could be that some plugin is setting the document to modified

you sent me system info by pm, but let’s continue discussion here

So it looks like saving as Rhino 8 works but not saving as Rhino 7. In that case I think your best bet is to run a small script after saving:

import scriptcontext as sc
sc.doc.Modified=False

Awesome! I’ll give that a try. Thank you.