Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am looking for a way to disable and enable a button on the ribbon from my addin in Inventor (2019). Meaning: the button should still be visible, but can not be clicked. I found how to have the button visible or not, but it would be better if the button is greyed out.
UserInterfaceManager userInterfaceManager = Globals.invApp.UserInterfaceManager;
Ribbon drawingRibbon = userInterfaceManager.Ribbons["Drawing"];
RibbonTab ribbonTab = drawingRibbon.RibbonTabs["tab_dwg"];
RibbonPanel ribbonPanel = ribbonTab.RibbonPanels["Drawing_panel_dwg"];
ribbonPanel.CommandControls["Button_internal_name"].Visible = false;
Solved! Go to Solution.