AutoCad: create a toolbar
Hi
I need to create a toolbar with some butons. I already can create a toolbar, however I can't use it to run macros maded by me. I just can run some intrisics rutines with the toolbar created. For example to open a file:
Sub Ch6_AddButton()
Dim currMenuGroup As AcadMenuGroup
Set currMenuGroup = ThisDrawing.Application.MenuGroups.Item(0)
’ Create the new toolbar
Dim newToolbar As AcadToolbar
Set newToolbar = currMenuGroup.Toolbars.Add("TestToolbar")
’ Add a button to the new toolbar
Dim newButton As AcadToolbarItem
Dim openMacro As String
’ Assign the macro the VB equivalent of "ESC ESC _open "
openMacro = Chr(3) + Chr(3) + Chr(95) + "open" + Chr(32)
Set newButton = newToolbar.AddToolbarButton _
("", "NewButton", "Open a file.", openMacro)
End Sub
How can I create a toolbar to use my owns macros?!?
Thanks in advance!
Re: AutoCad: create a toolbar
I try to do the same with a menu, but the problem is the same.
Anyone have any tip?