- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In the demo project CustomUI in the source code CustomUIAddinServer.cpp, there is a new Tab added to the Part Ribbon.
CComPtr<RibbonTab> pPartCustUIRibbonTab;
hr = pRibbonTabs->Add(CComBSTR(_T("CustomUI")),
CComBSTR(_T("Autodesk:CustomUI:CustomUIRibbonTab")),
CComBSTR(_T("{17ADEE74-528C-4682-84F8-9A64638D2E38}")), // Client id,
CComBSTR(_T("")),
VARIANT_FALSE,
VARIANT_FALSE,
&pPartCustUIRibbonTab);
if (FAILED(hr)) return hr;
I changed it so that instead of creating a new tab, it will get the tools tab.
Example:
CComPtr<RibbonTab> pPartCustUIRibbonTab;
hr = pRibbonTabs->get_Item(CComVariant(_T("id_TabTools")), &pPartCustUIRibbonTab);
There is an error in pRibbonPanels->Add(), it returns fail. To reproduce the error, go to the plugin manager and load the plugin, unload the plugin, load it a 2nd time. You will notice that the plugin fails to load, its because there was an error when adding a panel to the tab.
I think this is happening because the clean up must be different does anyone know what is wrong?
I have attached the CustomUI project with the change.
Solved! Go to Solution.