Inventor Customization

Inventor Customization

Reply
Active Member
7 Posts
0 Kudos
Registered: ‎10-02-2008
Post 1 of 5

How to activate Tab on the Ribbon?

1545 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
176 Posts
4 Kudos
Registered: ‎11-22-2009
Post 2 of 5

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
7 Posts
0 Kudos
Registered: ‎10-02-2008
Post 3 of 5

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
242 Posts
16 Kudos
Registered: ‎12-15-2011
Post 4 of 5

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
396 Posts
58 Kudos
Registered: ‎07-21-2006
Post 5 of 5

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 interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!