Inventor Customization

Inventor Customization

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

How to activate Tab on the Ribbon?

1498 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,498 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,498 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: 242
Registered: ‎12-15-2011
Message 4 of 5 (1,046 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: 343
Registered: ‎07-21-2006
Message 5 of 5 (994 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.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!