Still prompted to save after doc modified flag set to false

My document is still “edited” after I set the doc.Modified flag to false.

Version 8 (8.5.24072.13002, 2024-03-12)
Rhino Mac

import Rhino

doc = Rhino.RhinoDoc.ActiveDoc
doc.Modified = False

Hey @Johan_Lund_Pedersen,

In my brief testing, I’m not able to repeat this here.

Are you running any 3rd party plug-ins?

– Dale

Hi @dale

Thank you for getting back to me. I don’t think I have any plugins on the machine. My system info is below.

Am I right to assume that the code below should close Rhino without prompting to save?

Here is how it looks on my machine.

Also, the line Rhino.RhinoApp.Exit() does not appear to do anything. I need to use RunScript to get the “save as” response.

import Rhino

doc = Rhino.RhinoDoc.ActiveDoc

# Make a change to the doc
st = doc.Strings

doc.Modified = False
Rhino.RhinoApp.Exit() # This line does not appear to do anything.
Rhino.RhinoApp.RunScript("Exit", False) # This line promotes the save as.

Rhino 8 SR5 2024-3-12 (Rhino 8, 8.5.24072.13002, Git hash:master @ e3530849b75f00b2b977766a567ae29b055837e9)
License type: Educational, build 2024-03-12
License details: Cloud Zoo

Apple macOS Version 14.4.1 (Build 23E224) (Physical RAM: 8GB)
Mac Model Identifier: iMac21,1
Language: en-DK (MacOS default)
.NET 7.0.0

Metal GPU Family Apple 7
Metal GPU Family Common 3
Metal GPU Family Mac 2
Graphics processors
Apple M1
iMac (2240 x 1260 @ 60.00Hz)

USB devices
Apple Inc.: Apple MagSafe Charger
Apple Inc.: Apple Watch Magnetic Charging Cable
USB: SanDisk 3.2Gen1
USB: SanDisk 3.2Gen1

Bluetooth devices

Third party kernel extensions

Third party plugins

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
/Applications/Rhino “Renderer Development Kit” 8.5.24072.1002
/Applications/Rhino “Commands” 8.5.24072.13002
/Applications/Rhino “Snapshots” 8.5.24072.1002
/Applications/Rhino “RhinoCodePlugin” 8.5.24072.13002
/Applications/Rhino “RDK_EtoUI” 8.5.24072.13002
/Applications/Rhino “MeshCommands” 8.5.24072.13002
/Applications/Rhino “Rhino Render” 8.5.24072.13002
/Applications/Rhino “RhinoCycles” 8.5.24072.13002
/Applications/Rhino “SectionTools” 8.5.24072.1002
/Applications/Rhino “Displacement” 8.5.24072.1002
/Applications/Rhino “PanelingTools” 8.5.24072.1002
/Applications/Rhino “IronPython” 8.5.24072.13002
/Applications/Rhino “Grasshopper” 8.5.24072.13002

Hi @Johan_Lund_Pedersen,

Sorry for the delay in replying.

Setting the RhinoDoc.Modified flag in Rhino for Mac currently does nothing. This is because, unlike Windows, Mac document changes are managed by the operating system. For now, the best you can do is look to see if the document is modified and take whatever action you need.

Not sure why this isn’t document…

– Dale

Hi Dan

Thank you for your relay.

Am I right to assume that my options then are:

  1. save to a “temp” file and “-exit”
  2. do everything in a headless doc and then dispose() of the doc

I think that it would be nice if there was a way to exit without saving from the command line.
Something like “-Exit ExitWithoutSaveing”