Community
Dim icon_Main As IPictureDisp icon_Main = PictureDispConverter.ToIPictureDisp(My.Resources.Garant) Dim controlDefs As ControlDefinitions = m_inventorApplication.CommandManager.ControlDefinitions bt_main = controlDefs.AddButtonDefinition("Projektmanager", "int_projekt", CommandTypesEnum.kFilePropertyEditCmdType, app_guid, "beschreibung blabla", "tooltip", icon_Main, icon_Main, ButtonDisplayEnum.kAlwaysDisplayText) Dim uiManager As Inventor.UserInterfaceManager = m_inventorApplication.UserInterfaceManager Dim g_RibbonAssy, g_RibbonPart As Inventor.Ribbon Dim g_TabAssy As Inventor.RibbonTab Dim g_panel As Inventor.RibbonPanel g_RibbonAssy = uiManager.Ribbons.Item("Assembly") g_TabAssy = g_RibbonAssy.RibbonTabs.Add("TEST", "test_int", app_guid) g_panel = g_TabAssy.RibbonPanels.Add("test_panel", "test_pan_int", app_guid) g_panel.CommandControls.AddButton(bt_main) g_RibbonPart = uiManager.Ribbons.Item("Part")
When i start this code, a nice tab shows up when i open an assembly, good!
But Now i want to show the same tab with the same button in Part Ribbon.
How can i do that?
Hi,
You do exactly the same but using "Part" Ribbon instaed of "Assembly". It seems you where already on the right track...
If you want to display the same button in the Part, you can just reuse the same ButtonDefinition, so you don't need to recreate that.
Hope it helps.