Hello.
I’m building a plugin that adds a custom page to the Object Properties panel via ObjectPropertiesPages(ObjectPropertiesPageCollection collection). The page registers fine and works correctly once manually clicked. My question is: how do I make it the active/displayed page programmatically, either on startup or after a selection change?
So far I’ve tried and failed:
-
collection.Add(_page)alone — adds the page, but Rhino always restores whichever page was last active before the session ended. On first install, it lands on the built-in “Object” page, not mine. -
Calling
RhinoApp.ActiveDoc.Views.Redraw()+ reflection to find the panel host insideOnLoad— no API surface found onObjectPropertiesPageCollectionorObjectPropertiesPageto set an active index. -
Subscribing to
RhinoApp.Idleand attempting a deferred activate — there’s no method onObjectPropertiesPageor any apparent host interface to say “navigate to this tab.” -
OnActivate(bool active)override — only fires when the page is already being activated by the user; it’s a notification, not a trigger. -
OnCreateParent(IntPtr parent)override — fires when the control is parented, but no Rhino API is accessible at that point to switch the panel to this page.
Specific questions:
- Is there a public API to programmatically set the active page in the Properties panel — something like
Rhino.UI.PropertiesPanelPage.NavigateTo(page)or a method on the panel host? - Does
ObjectPropertiesPageCollectionexpose any ordering or default-page mechanism? - Is there a way to intercept the panel’s page-restore-from-settings step and inject a preference?
- In the Rhino source (or SDK samples), is there a working example of a plugin page being made active on load without user interaction?
- Does
RhinoPageHooksor any internal interface (accessible via reflection) support tab switching in the Properties panel?
Environment: Rhino 8, C# plugin, net7.0-windows, PlugInLoadTime.AtStartup.
Thank you