Message 1 of 5
Add RibbonPanel

Not applicable
03-06-2016
02:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I think I need to update some legacy code in one of my add-ins. This used to create a ribbon panel and/or add it to the drawing toolbar if was already created. When I unload the add-in the panel is removed but a releoad does not work and the panel is never shown. Any ideas as to what the new code should look like? I don't think the Try's are necessary anymore either.
Try
oPanel = oUIManager.Ribbons("Drawing").RibbonTabs("id_TabTools").RibbonPanels("id_Cadtoolboxtab")
Catch ex As Exception
oPanel = oUIManager.Ribbons("Drawing").RibbonTabs("id_TabTools").RibbonPanels.Add _
("CAD Toolbox", "id_Cadtoolboxtab", "{1e7ab662-0fa3-4f9b-9dd4-89c12ef9aa06}")
End Try
oPanel = oUIManager.Ribbons("Drawing").RibbonTabs("id_TabTools").RibbonPanels.Add _
("CAD Toolbox", "id_Cadtoolboxtab", "{1e7ab662-0fa3-4f9b-9dd4-89c12ef9aa06}")
End Try