By Adam Nagy
I would like to modify the Ribbon content - add/remove panels, etc. How could I do it?
This is only available through the .NET API's.
There are two sets of functionalities:
1) Ribbon Runtime API - provided by AdWindows.dll under Autodesk.Windows namespace
Enables you to edit the Ribbon, but the changes will not be persisted in the CUIx file, so if AutoCAD is restarted, or even if the current workspace is changed (WSCURRENT system variable) or the menu file is reloaded then the changes will be gone and you need to redo them.
Here is a small sample that toggle's the visiblity of the Home tab:
static public void HideShowHomeTab()
Autodesk.Windows.RibbonControl rc =
Autodesk.Windows.RibbonTab tab =
if (tab != null)
tab.IsVisible = !tab.IsVisible;
2) CUI API - provided by AcCui.dll under Autodesk.AutoCAD.Customization namespace
You can use this to modify the user interface by modifying the CUIx file the same way as through the CUI Dialog and these changes will be persisted.
This sample as well toggles the visibility of the Home tab, but using the CUI API:
using acApp = Autodesk.AutoCAD.ApplicationServices.Application;
static public void HideShowHomeTabInCurrentWorkspace()
string menuName =
string curWorkspace =
Autodesk.AutoCAD.Customization.CustomizationSection cs =
menuName + ".cuix");
Autodesk.AutoCAD.Customization.WSRibbonRoot rr =
Autodesk.AutoCAD.Customization.WSRibbonTabSourceReference tab =
if (tab != null)
tab.Show = !tab.Show;
// Reload to see the changes
Note: The above samples only work without modification in case of using vanilla AutoCAD (where the menu group is ACAD) and inside 3D Modeling workspace (where the Home tab's id is ID_TabHome3D)