Ask users to save file?

I’m using SetDocumentUserText in my Rhinoscript, but after the script runs I don’t want users to be able to close Rhino without warning to save file. Is there a way to do this? I suppose I could add a point to the file and then delete it, but I’d rather not make any geometry changes if possible.

So you’re saying that adding a user text does not automatically set the document modified flag to true? That should be considered a bug IMO.

Hmm, in a quick test here (V6), setting a document user text in a file that is saved and has not been modified since the save does bring up the save changes warning dialog when you hit the close box…

You can set it yourself in your script to make sure - rs.DocumentModified().

Huh, I really thought I saw that it didn’t, but now that I’ve had some coffee it seems to work as expected. Thanks!

Things always work better after coffee… :stuck_out_tongue_winking_eye:

1 Like