Active tab at Rhinoceros starting



Hello! :blush:
I’m developing plug-in using C++.
The feature I’m trying to implement is: If the current session of Rhinoceros is closed with active (selected) tab “Properies”

then after the start of new Rhinoceros session this tab will be also active (by default as I can see the left tab is always active after Rhinceros loading).

For this I:

  1. I save the ID’s of active tabs (gotten by CRhinoTabbedDockBarDialog::GetOpenTabIds()) in register.
  2. After Rhinoceros start (in CRhinoIsIdle) I show saved tabs (ShowDockbarTab)

The question is:
When can I save active tabs? I want to save them right before closing of Rhinoceros. But in “OnUnloadPlugIn”, “OnCloseDocument”, “OnCloseRhino” dockBar’s are already destroyed and “GetOpenTabIds” returns nothing.

For now I save them in “OnEndSaveDocument”. But it would be great to save active tabs even without document saving.
Thanks for any help you can provide!

(Dale Fugier) #2

Hi @zer41k,

Try overriding CRhinoPlugIn::OnSaveAllSettings and handle your saving there.

– Dale