Results 1 to 2 of 2

Thread: AutoCad: create a toolbar

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2005
    Posts
    20

    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!
    Last edited by Helder Barros; Aug 24th, 2005 at 05:01 PM.

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Aug 2005
    Posts
    20

    Re: AutoCad: create a toolbar

    I try to do the same with a menu, but the problem is the same.

    Anyone have any tip?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width