Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
ADAAAM
in reply to: dgreatice

Hi!

 

I would like to create a custom RibbonTab. I used your code, but unfortunately it doesn't appear the tab. When I open Inventor it "MyRibbon" appears just for 1 sec then disappear. How can I solve it? Can you help me?

 

#Region "User interface definition"
        ' Sub where the user-interface creation is done.  This is called when
        ' the add-in loaded and also if the user interface is reset.
        Private Sub AddToUserInterface()
            ' This is where you'll add code to add buttons to the ribbon.

            '** Sample to illustrate creating a button on a new panel of the Tools tab of the Part ribbon
            Dim oUIM As UserInterfaceManager = m_IA.UserInterfaceManager
            Dim oIFS As InterfaceStyleEnum = oUIM.InterfaceStyle



            If oIFS = InterfaceStyleEnum.kRibbonInterface Then
                Dim oRibs As Ribbons = oUIM.Ribbons
                Dim oAssyRib As Ribbon = oRibs.Item("ZeroDoc")
                Dim oAssyRibTabs As RibbonTabs = oAssyRib.RibbonTabs
                Dim oAssyRibTab As RibbonTab = oAssyRibTabs.Add("MyRibbon", "id_MyCustomRibbon", m_clientID, "id_TabTools", True)
            End If

 I'm using Inventor 2020 and VS2017.