Question:
I wanted to modify the title of the buinlt-in ribbon tab and panel, such as [Tool Add-ins 1], [Tool Add-ins 2], [Tool Add-ins 3].
Solution
Navisworks also uses the same library to present a Ribbon: AdWindows.dll
This provides a public API under the namespace Autodesk.Windows
Here is the examples of using it inside
Revit:
http://thebuildingcoder.typepad.com/blog/2011/02/pimp-my-autocad-or-revit-ribbon.html
Inventor:
http://adndevblog.typepad.com/manufacturing/2014/01/modify-ribbon-and-menu-items.html
but it's not a officially supported approach. And some functions like adding a command button to the Ribbon are not supported. So we cannot guarantee the behaviors. When using it, take care and make sure that everything is working as expected.
For the question to modify title of the built-in ribbon tab and panel, the code snippet would be:
public void modifyRibbon()
{
RibbonTabCollection oTabs = Autodesk.Windows.ComponentManager.Ribbon.Tabs;
RibbonTab oCloneTab = null;
foreach(RibbonTab oTab in oTabs)
{
if (oTab.Title == "Tool Add-ins 1")
{
oTab.Title = "MyTab1";
RibbonPanelCollection oPanels =
oTab.Panels;
foreach (RibbonPanel oRP in oPanels)
{
if (oRP.Source.Title ==
"Tool Add-ins 1")
{
oRP.Source.Title =
"MyTab1_Panel1";
break;
}
}
break;
}
}
}