Grasshopper UI no longer detect clicks after script

Hi all,
referring to this: Rhino Command Export in C#

With something as short as this:
2019-06-10%2013_32_29-Window
export.gh (2.7 KB)

I want to export an already selected geometry to a .dxf file.
If no geometry is selected, it doesn’t do anything… correctly.
If a geometry is selected, it is being exported as intended to the correct path, but after that grasshopper UI no longer detects mouse clicks (but you can still zoom in/out with the wheel).

(I was trying to make a fast simple bake-and-export to export from gh to file … this is the pin-pointed problem)

Any idea for a fast solution that doesn’t involve plug-ins?
A way to “restart” or refresh Grasshopper UI to fix the problem?

Code:

private void RunScript(bool x, ref object A)
  {
    if(x){
      string command = "-_Export \"C:\\test\\test.dxf\" _Enter";
      RhinoApp.RunScript(command, false);
    }
  }

Up? :sweat_smile:

Anyone know how a way to export gh geometries without additional plug-ins?

This is a known issue when triggering a script using a Button component. Try switching it out with a Boolean Toggle and see if this at least means that the script will run as expected, and not lock up the GH canvas.

2 Likes

That was it!
Thank you!