Inventor Customization

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

How to activate Tab on the Ribbon?

1313 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
Posts: 175
Registered: ‎11-22-2009
Message 2 of 5 (1,313 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
Posts: 7
Registered: ‎10-02-2008
Message 3 of 5 (1,313 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: 221
Registered: ‎12-15-2011
Message 4 of 5 (861 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
Posts: 287
Registered: ‎07-21-2006
Message 5 of 5 (809 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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube