Help Creating a Button VB,NET Addin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I have a need to write an Inventor addin that loads some macrobuttons to the quick access toolbar.
I think I have it figured out as a test in VBA. No clue as to how to write it to be persistent as a VB.NET addin.
I downloaded the 2013 Wizards and templates and have started a Inventor Addin for VB.NET
I've located the Region "ApplicationAddInServer Members" but need a nudge to get started.
Any help here?
--- Test VBA Code Follows ---
Private Sub CommandButton1_Click()
Dim myMacro As Inventor.MacroControlDefinition
'Dim ZeroDocQAControls As Inventor.CommandControls
Dim PrtQAControls As Inventor.CommandControls
Dim AssyQAControls As Inventor.CommandControls
Dim DwgQAControls As Inventor.CommandControls
'Test macro to set in the quick launch toolbbar.
Set myMacro = ThisApplication.CommandManager.ControlDefinitions.Item("macro:basLaunch.Dim_Power")
' What is the Item name for zero document loaded. (NO Part,Assembly, or Drawing Environment)
'Set ZeroDocQAControls = ThisApplication.UserInterfaceManager.Ribbons.Item("Zero Document").QuickAccessControls
Set PrtQAControls = ThisApplication.UserInterfaceManager.Ribbons.Item("Part").QuickAccessControls
Set AssyQAControls = ThisApplication.UserInterfaceManager.Ribbons.Item("Assembly").QuickAccessControls
Set DwgQAControls = ThisApplication.UserInterfaceManager.Ribbons.Item("Drawing").QuickAccessControls
' Add Test macro to Quick Access Toolbars.
'Call ZeroDocQAControls.AddMacro(myMacro)
Call PrtQAControls.AddMacro(myMacro)
Call AssyQAControls.AddMacro(myMacro)
Call DwgQAControls.AddMacro(myMacro)
End Sub