Inventor Customization

Inventor Customization

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

How to activate Tab on the Ribbon?

1517 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,517 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,517 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,065 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: 351
Registered: ‎07-21-2006
Message 5 of 5 (1,013 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
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.