Inventor Customization

Inventor Customization

Reply
Active Member
jursa_martin
Posts: 7
Registered: ‎10-02-2008
Message 1 of 5 (1,417 Views)

How to activate Tab on the Ribbon?

1417 Views, 4 Replies
03-31-2010 11:23 PM
Hi All. How to activate specific Tab on the Ribbon by VB.Net code? Exist any way how to "bring to front" my own Ribbon Tab?

Thanks Martin
Mentor
krieg
Posts: 176
Registered: ‎11-22-2009
Message 2 of 5 (1,417 Views)

Re: How to activate Tab on the Ribbon?

04-01-2010 04:29 AM in reply to: jursa_martin
Hello

It's VBA, but the way is the same.

Sub ChangePanelToToolsTab()

' Get the ribbon associated with the part document
Dim oPartRibbon As Ribbon
Set oPartRibbon = ThisApplication.UserInterfaceManager.Ribbons.Item("Part")

' Get your own tab
Dim oTab As RibbonTab
Set oTab = oPartRibbon.RibbonTabs.Item("your_own_tab_name")

'activate it
oTab.Active = True

End Sub
Active Member
jursa_martin
Posts: 7
Registered: ‎10-02-2008
Message 3 of 5 (1,417 Views)

Re: How to activate Tab on the Ribbon?

04-02-2010 12:57 AM in reply to: jursa_martin
Hi krieg, thanks for reply, your code working fine. I appreciate your help.

Martin
Mentor
amitk_189
Posts: 238
Registered: ‎12-15-2011
Message 4 of 5 (965 Views)

Re: How to activate Tab on the Ribbon?

04-24-2012 11:36 PM in reply to: krieg

Its not working, 

 

oTab = oPartRibbon.RibbonTabs.Item("Test")

got error on this above line

how to resolve this

ADN Support Specialist
ekinsb
Posts: 300
Registered: ‎07-21-2006
Message 5 of 5 (913 Views)

Re: How to activate Tab on the Ribbon?

05-09-2012 05:38 PM in reply to: amitk_189

The name you use to specify the tab in the internal name that was assigned when the tab was created.  This may or may not be the same as the displayed name on the tab.  With the information you've given that's the only thing I can think of that might be wrong.



Brian Ekins
Developer Technical Services
Autodesk Developer Network
Autodesk, Inc.
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.