Commands not running properly with floating viewport

Hi,

We have run into an issue with our plugin. There is a command that creates a floating viewport, and then asks the user to input a value. This works fine when you do it manually as a user, but when you automatically run the command (for example with RunScript) it seems like the secondary commands don’t get processed the same way.

We tried a couple of workarounds with setting the focus back to the main window, changing the active view to a non-floating one, etc, but have not found a solution to this yet.

Attached is a C# example of this. If you use the MyRhinoCommand1 command normally it works, but if you do “_-MyRhinoCommand1 _Enter” it doesn’t.
FloatingViewportAndCommandsBug.zip (163.9 KB)

Does anyone know of a workaround for this?

Hey Siebren, is this Rhino 7 or 8? Do you know if it works or doesn’t work in both?

– cs

Tried it on Rhino 8 with a command and with the Windows Command Prompt. It seems to work great there, thanks for the help!