Alright im getting somewhere now.
Attached is my project file as is. Finally was able to find a tutorial done from AU back in 2009
http://images.dcheetahimages.com/au.autodesk.com/ama/images/media/AU09_SpeakerHandout_CP208-2.pdf
So started going through it finally got a tab to be created, though now running in issues trying to get the panel to load with buttons. I've copied it exactly though not sure what im doing wrong with this.
Below is the code so far (as can be seen also attached)
Though my one spot im having issues with is the AdskCommandHandler Class. Specifically
SendStringToExecute(_
ribBtn.CommandParameter, True, False, True)
Imports System
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.Windows
Imports Autodesk.Windows
Public Class Testing
Implements IExtensionApplication
Public Sub Initialize() Implements Autodesk.AutoCAD.Runtime.IExtensionApplication.Initialize
createRibbon()
End Sub
Public Sub Terminate() Implements Autodesk.AutoCAD.Runtime.IExtensionApplication.Terminate
End Sub
Private Sub CreateRibbon()
'declare a ribboncontrol object
Dim ribCntrl As RibbonControl = ComponentManager.Ribbon
'create a ribbontab
Dim ribTab As New RibbonTab()
'set a few properties
ribTab.Title = "AU2009"
ribTab.Id = "AU2009"
'add the tab to the ribbon
ribCntrl.Tabs.Add(ribTab)
'set as active tab
ribTab.IsActive = True
End Sub
Private Sub addContent(ByVal ribTab As RibbonTab)
'create the panel source
Dim ribSourcePanel As RibbonPanelSource = New RibbonPanelSource()
ribSourcePanel.Title = "Dev Tools"
'now the panel
Dim ribPanel As New RibbonPanel()
ribPanel.Source = ribSourcePanel
ribTab.Panels.Add(ribPanel)
'create a button
Dim ribButton1 As RibbonButton = New RibbonButton()
ribButton1.Text = "Net Load"
ribButton1.CommandParameter = "NETLOAD "
ribButton1.ShowText = True
ribButton1.CommandHandler = New AdskCommandHandler()
'add the button
ribSourcePanel.Items.Add(ribButton1)
End Sub
End Class
Public Class AdskCommandHandler
Implements System.Windows.Input.ICommand
Public Function CanExecute(ByVal parameter As Object) As Boolean _
Implements System.Windows.Input.ICommand.CanExecute
Return True
End Function
Public Event CanExecuteChanged As EventHandler Implements _
System.Windows.Input.ICommand.CanExecuteChanged
Public Sub Execute(ByVal parameter As Object) Implements _
System.Windows.Input.ICommand.Execute
Dim ribBtn As RibbonButton = TryCast(parameter, RibbonButton)
If ribBtn IsNot Nothing Then
Autodesk.AutoCAD.ApplicationServices.Application.
DocumentManager.MdiActiveDocument.
SendStringToExecute(_
ribBtn.CommandParameter, True, False, True)
End If
End Sub
End Class
Any help apperciated.