V5 to V6 compatibility

testing my plugin in V6(and hoping to be cross compatible). Seems the return type on Rhino.UI.SaveFileDialog.ShowDialog() has changed from
System.Windows.Forms.DialogResult to bool…

My thought is to cast to int(which seems to be working).

But I thought I would mention it. Maybe something smarter can be done.

edit: that cast did not work…

this seems to:

Rhino.UI.SaveFileDialog dlg = new Rhino.UI.SaveFileDialog();
//set some other props…
int test;
object result = dlg.ShowDialog();
if(result.GetType() == typeof(DialogResult))
test = (int)result;
test = (bool)result ? 1 : 0;
if (test == 1)


1 Like

I see that and will try to get it fixed this week. Next week’s WIP will have the same signature as V5

1 Like