RhinoApp.RunScript Not Blocking

Hi Mike,

The attached sample seems to work here.

Try this:

1.) Build the sample
2.) Launch Rhino and use PlugInManager to install the plug-in.
3.) Put break points in SampleCsModelessTextForm.button1_Click and in SampleCsScriptableCommand.RunCommand.
4.) Run the SampleCsModelessFormCommand command.
5.) Pick the Import button. I’ve included a PDF file to test with.
6.) When your first break point is hit, keep pressing F10 to step over each statement.

You will eventually see the break point in the command hit. Continue pressing F10. When the command finishes, execution returns to the modeless form.

SampleCsModelessForm.zip (36.2 KB)

Does this help or am I confused?

Also, keep in mind RunScript returns Boolean indicating whether or not the command. If you want to know if the command ran successfully, you will need to watch for the OnEndCommand event and check the Result value.

– D