how two addins share one Tab?

how two addins share one Tab?

Anonymous
Not applicable
264 Views
0 Replies
Message 1 of 1

how two addins share one Tab?

Anonymous
Not applicable

hi,

 

I have two addins (MyOne.dll & MyTwo.dll) and want them under one Tab (MyAddIn) in Part enviorment.

Each can creates the Tab by themself, but if two loaded together, how do they share that Tab.

 

I tried these code below:

 

            If (firstTime) Then

                Dim UIManager As UserInterfaceManager = m_inventorApplication.UserInterfaceManager
                If (UIManager.InterfaceStyle = InterfaceStyleEnum.kRibbonInterface) Then

                    Dim partRibbon As Inventor.Ribbon = UIManager.Ribbons.Item("Part")

                    Dim MyTab As RibbonTab = Nothing
                    For Each tab As RibbonTab In partRibbon.RibbonTabs
                        If tab.Name = "MyAddIn" Then
                            MyTab = tab
                            Exit For
                        End If
                    Next

                    If MyTab Is Nothing Then
                        MyTab = partRibbon.RibbonTabs.Add("MyAddIn", "id_TabMyAddIn", MyOnestrAddInGuid)
                    End If

                    Dim MyOnePanel1 As Inventor.RibbonPanel = MyTab.RibbonPanels.Add("MyOne", "MyOne:Panel1", MyOnestrAddInGuid)
                    MyPanel.CommandControls.AddButton(mPartButtonDef, True)

                End If

            End If

 Just wodering how do I deal with the strAddInGuid? Do I need to keep them all the same and even the same namespace?

 

Thx in advance

 

cean

0 Likes
265 Views
0 Replies
Replies (0)