public Panel(Inventor.Application invApp, ButtonDefinition btnDef, string ribbonName, string ribbonTabName, string displayName, string intName, string m_guid) { UserInterfaceManager userInterfaceManager; userInterfaceManager = invApp.UserInterfaceManager; Ribbons ribbons; ribbons = userInterfaceManager.Ribbons; Ribbon ribbon; ribbon = ribbons[ribbonName]; RibbonTabs ribbonTabs; ribbonTabs = ribbon.RibbonTabs; RibbonTab ribbonTab; ribbonTab = ribbonTabs[ribbonTabName]; RibbonPanels ribbonPanels; ribbonPanels = ribbonTab.RibbonPanels; RibbonPanel ribbonPanel; ribbonPanel = ribbonPanels.Add(displayName, intName, m_guid, "", false); //CommandControls commandControls; m_commandControls = ribbonPanel.CommandControls; m_commandControl = m_commandControls.AddButton(btnDef); }
public Panel(string ribbonName, string ribbonTabName, string ribbonPanelName) { UserInterfaceManager uim = Macros.StandardAddInServer.m_inventorApplication.UserInterfaceManager; m_commandControls = uim.Ribbons[ribbonName].RibbonTabs[ribbonTabName].RibbonPanels[ribbonPanelName].CommandControls; }