I’m trying to migrate a vb.net plugin to Rhino6, but I have an issue: I can’t find the equivalent for getpanel() in the new rhinocommon framework.
Until now I used this:
Dim type = GetType(MSP_MainPanel)
Dim MyMSPPanel As MSP_MainPanel = TryCast(Rhino.UI.Panels.GetPanel(type.GUID), MSP_MainPanel)
but is it deprecated, what should I do now to get my panel instance?
Thanks for helping.
Thanks @nathanletwory, I’ll try this. Though I don’t understand why a panel would need a reference to rhinodoc.
This is pretty much in preparation for the Mac so we, and you, can write cross-platform plug-ins. On the Mac on Rhino instance is alive with multiple documents open. These additions allow you to know what document a panel is for so the right data can be shown.
To prepare your plug-in for this you should try to get rid of ActiveDoc usage in your code. Use the doc passed to you and get its runtime serial number. With that you can always retrieve the doc you need.
ok thanks. it works for me