RhinoApp.RunScript not fired when called from OptionsDialogPage

Hey, I am trying to write a C# plugin for Rhino. Right now I am trying to run a command after settings of my plugin changed. Problem is, that when I try to call RhinoApp.RunCommand() from OnApply method of my OptionsDialogPage, it does not get invoked.
I use completely same pattern in ObjectPropertiesPage where it works fine.

Is there something wrong about the way a chose?

Thank you

Hi @h.kirchner94,

Rhino’s Options command is what displays the options dialog box. I’m not surprised RhinoApp.RunCommand does not work while this command is running, as the dialog box displayed by the commnad, is modal.

On the other hand, Rhino’s Properties panel is modeless. Thus, RhinoApp.RunCommand works as expected.

More on model and modeless dialog boxes:

Does this help?

– Dale

Thank you Dale,
now I know why RunCommand is not working in modal.
But what is the proper way to update views after change in setting occurs? Can I simply use RhinoDocument that is passed through DocumentPropertiesDialogPages function to calculate data I need and redraw views?

Hi @h.kirchner94,

Sure, just do something like this:

if (null != doc)

– Dale