How to switch the active page in the Obj Properties panel from a plugin?

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:

  1. 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.

  2. Calling RhinoApp.ActiveDoc.Views.Redraw() + reflection to find the panel host inside OnLoad — no API surface found on ObjectPropertiesPageCollection or ObjectPropertiesPage to set an active index.

  3. Subscribing to RhinoApp.Idle and attempting a deferred activate — there’s no method on ObjectPropertiesPage or any apparent host interface to say “navigate to this tab.”

  4. OnActivate(bool active) override — only fires when the page is already being activated by the user; it’s a notification, not a trigger.

  5. 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:

  1. 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?
  2. Does ObjectPropertiesPageCollection expose any ordering or default-page mechanism?
  3. Is there a way to intercept the panel’s page-restore-from-settings step and inject a preference?
  4. In the Rhino source (or SDK samples), is there a working example of a plugin page being made active on load without user interaction?
  5. Does RhinoPageHooks or 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

Short answer: there isn’t a public API for this, and that’s intentional.

The Object Properties panel is selection-driven, not plugin-driven. Which pages appear is determined by the selection (via ShouldDisplay), and the active page is picked from those by object type - the current page is kept if it still matches the new selection, otherwise Rhino falls back to the first visible page of the matching type. There’s no per-plugin “make me active” hook by design. If there were, every plugin with a properties page would fight for that slot on every selection change.

If you want persistent panel data displayed at a level your plugin controls, I’d suggest a standard panel instead. You can subscribe to selection events to drive its state, and since it’s your panel you can show it, force it open, and keep it visible on your own terms.