adding custom made ribbon panel to a Ribbon tab that add by another addin

adding custom made ribbon panel to a Ribbon tab that add by another addin

Mehmet_Fatih_Turker
Advocate Advocate
188 Views
1 Reply
Message 1 of 2

adding custom made ribbon panel to a Ribbon tab that add by another addin

Mehmet_Fatih_Turker
Advocate
Advocate

Hi all, 

 

İt's sound weird but I need answer to that question, So, is it possible to add a ribbon panel that is made by addin to a ribbon tab that is added by another addin ? I have Ribbon tabs ID name.

0 Likes
189 Views
1 Reply
Reply (1)
Message 2 of 2

BM_Ashraf
Advocate
Advocate

Hi @Mehmet_Fatih_Turker 

I think that's possible. I'm currently testing something similar. but still not finished yet.
But what i can gurantiee that you can get the Command control and Button definitions and add them to any Ribbon Tab you wish and it will do the same job.

Here is an example of how to get any button definition

Dim oDef As ButtonDefinition

Set oDef = ThisApplication.CommandManager.ControlDefinitions.Item("AppLocalUpdateCmd") ' Change the '"AppLocalUpdateCmd" with the button you wish

Then Add it to any Ribbon or Ribbon Tabs you wish

Dim oRibbons As Ribbons

Set oRibbons = ThisApplication.UserInterfaceManager.Ribbons

Dim oRibbon As Ribbon

Set oRibbon = oRibbons("Assembly")
Dim oRibbonTab As RibbonTab
Set oRibbonTab = oRibbon.RibbonTabs("Please insert the Tab Internal Name")
Dim oAssRibbonPanel As RibbonPanel

Set oAssRibbonPanel = oRibbonTab.RibbonPanels.Item("Please insert the Tab Internal Name")

Dim oCMDControl As CommandControl

set oCMDControl = oRibbonTab.CommandControls.AddButton(oDef)


Hope this helps you to move forward!

 

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.

Blue Mech

Add-ins for Inventor!

0 Likes