Can I copy or export a state to another file?

Hi,

Is it possible to copy a state or states (Grasshopper menu>Solution> Save state) from one grasshopper file to another (but similar) grasshopper file?

Cheers, Bas

private void RunScript(string fp)
{
  var io = new GH_DocumentIO();
  io.Open(fp);
  var doc = io.Document;
  var states = doc.StateServer;
  GrasshopperDocument.StateServer.AddRange(states);
}

Import States.gh (2.2 KB)

1 Like

Thank you Mahdihar. I will test your solution. Thanks for the clear explanatory movie.
Bas