Hi, I’m working with Rhino8 and in my PlugIn I’m writing a command that requires the “Layers” panel always visible so I write this code sample that iterates all the panels and when the name is equal to “Layers” I show the dock bar tab.
ON_SimpleArray<const CRhinoUiPanelFactory*> factories;
RhinoUiPanelFactories(factories);
for (int i = 0; i < factories.Count(); i++)
{
const CRhinoUiPanelFactory* p_panel = factories[i];
if (p_panel != nullptr)
{
ON_UUID tabId = p_panel->TabId();
ON_wString name = p_panel->Caption();
if (name == L"Layers")
{
RhinoUiOpenDockbarTab(*RhinoApp().ActiveDoc(), tabId);
break;
}
}
}
This works fine for my purpose but I have a doubt about the function Caption.
It depends by the Installation language?
Maybe I can capture the “Layers” panel by an unique ID?
bye