Trigger Save of GH file from Human UI?

unhandled

#1

First !
:slight_smile:

OK, how could I trigger a “save” of the current GH file from a button in a Human UI ?
That would allow to save sets of Element states from one session to another…


(Andrew Heumann) #2

a one-line c# script ought to do it
private void RunScript(object x, object y, ref object A)
{
Grasshopper.Instances.DocumentEditor.ScriptAccess_SaveDocument();
}


#3

That seems to work only in Rhino 6

( screenshot removed)

(I couldn’t find a way to do this in Rhino 5).

// Rolf


(Andrew Heumann) #4

it works fine in Rhino 5 too, I just tried.


#5

Unbelievable! I had tried so many things and then finally giving up on all pages marked with Rhino 6.0… :slight_smile:

Thanks.

// Rolf