No toolbar collections in CRhinoAppUiToolBarManager

Hi there, I came across a very strange problem in our C++ plugins, using CRhinoAppUiToolBarManager. I’m sure this worked before, but now doesn’t anymore. On loading of my plugins I want to make sure that the corresponding toolbars are opened and shown correctly. The strange thing is that the CRhinoAppUiToolBarManager& which I get back from RhinoApp().RhinoUiToolBarManager() does not contain any toolbar collections, despite some are loaded. CRhinoAppUiToolBarManager::CollectionCount() always returns 0.

// Get Rhino's toolbar manager.
CRhinoAppUiToolBarManager& manager = RhinoApp().RhinoUiToolBarManager();

// debug - print aliases and filenames of all collections
for ( int i=0, imax=manager.CollectionCount(); i<imax; i++ )
{
	const CRhinoUiToolBarCollection* collection = manager.Collection(i);
	if ( collection )
	{
		RhinoApp().Print( "%s\n", collection->Alias() );
		RhinoApp().Print( "%s\n", collection->FileName() );
	}
}

I would be very thankful for ideas on what could be the problem.

CRhinoAppUiToolBarManager is obsolete, left over from Rhino 4. Use CRhinoUiFile, see rhinoSdkUiFile.h for details.

– Dale

oops, thanks for the hint :slight_smile:

but someone then please removes this page:
http://developer.rhino3d.com/samples/cpp/show-toolbar-in-workspace-file/

Hi @StephanSchmaelzle,

Done - thanks. Give a few minutes and the page will disappear…

– Dale