Render windows taking focus in batch render

Hi, I’ve just started writing my first plug-in for rhino made a couple of commands to batch render shadow diagrams by moving the sun around. Im using the following inside a loop to do so:

                Rhino.RhinoApp.RunScript("_-Render", true);
                Rhino.RhinoApp.RunScript("_-SaveRenderWindowAs \n\"" + savedLocation + "\"\n", false);
                Rhino.RhinoApp.RunScript("_-CloseRenderWindow", false);

The commands works fine but it each time a render is completed, a new render window is created and takes topmost window on my computer making it difficult for me to do anything else on while the command is running. Is there a way to hide or stop the window from taking focus?


Hi @patrick,

have you tried to gain focus using


i am not shure if the render window of your renderer is modal or not, a modal dialog or window retains the input focus while open, but it might be worth a try.


There is not much you can to do suppress dialogs, other than running Rhino on a second monitor while working on the first.

If you batch render via automation, you can hide Rhino completely. But you might be limited in other ways. For example:

thanks for the reply clement, unfortunately the render window still manages to grab focus regardless of whether i try to force it to stay on the main window

thanks dale, i didnt think of this, ill give it a go

Do you run this from within Rhino or can I also create a windows form and set some settings and use that?