Create ribbon with vba
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi !
Is it possible ?
Thanks
Hi !
Is it possible ?
Thanks
Please explain a little more what you need, because a/the ribbon is always there.
Regards,
Arthur Knoors
Autodesk Affiliations & Links:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
Do you want to create a new ribbon tab?
Here is an example i made in iLogic. Should be easy to rewrite as VBA code.
Class ThisRule Sub Main ' Get the assembly ribbon. Dim AssemblyRibbon As Ribbon = ThisApplication.UserInterfaceManager.Ribbons.Item("Assembly") ' Create a new tab. Dim oTab As RibbonTab = AssemblyRibbon.RibbonTabs.Add("New Tab", "id_newTab", Guid.NewGuid().ToString()) ' Create a new panel. Dim oPanel As RibbonPanel = oTab.RibbonPanels.Add("New Panel", "id_newPanel", Guid.NewGuid().ToString()) Dim controlDefs As Inventor.ControlDefinitions = ThisApplication.CommandManager.ControlDefinitions Dim m_sampleButton As ButtonDefinition = controlDefs.AddButtonDefinition("Button", "oButton", CommandTypesEnum.kShapeEditCmdType) ' Add a button. oPanel.CommandControls.AddButton(m_sampleButton, True) End Sub End Class
This should really be done in an AddIn but you can do it this way
Jhoel Forshav Download my free Inventor Addin - Hole Projector
LinkedIn | Ideas | Contributions | Blog posts | Website
The code i posted creates a tab in the assembly environment. So if you run it from within a part you won't see the tab appear. I'm sure you can tell by the code but I might as well mention it 🙂
Jhoel Forshav Download my free Inventor Addin - Hole Projector
LinkedIn | Ideas | Contributions | Blog posts | Website