Adding a toolbar button using Lisp

Discussion in 'AutoCAD' started by griceldaromero, Feb 11, 2004.

  1. I need to dimension the length of an arc and I wanted to add a toolbar button and add a LISP or macro to that. But LISP and macro are new to me, I've never done that before. I don't know where to begin. Some help please?
     
    griceldaromero, Feb 11, 2004
    #1
  2. griceldaromero

    Paul Turvill Guest

    You'll find a LISP solution, DIMARC.LSP at
    http://www.turvill.com/t2/free_stuff

    As for setting it up as a toolbar macro, that's covered pretty well in the
    Customization Guide section of HELP (F1).
    ___

    button and add a LISP or macro to that.
     
    Paul Turvill, Feb 11, 2004
    #2
  3. All you need to know is documented in the help files.

    Begin by going to Help -> Developer Help ->
    Customization guide -> Custom Menus -> Toolbars

    --

    -Jason
    Member of the Autodesk Discussion Forum Moderator Program


    LISP or macro to that. But LISP and macro are new to me, I've never done that before. I
    don't know where to begin. Some help please?
     
    Jason Piercey, Feb 11, 2004
    #3
  4. griceldaromero

    Tom Smith Guest

    Also, look at the tutorials at http://www.afralisp.com where you'll find a
    good discussion of integrating lisp in menus.
     
    Tom Smith, Feb 11, 2004
    #4
  5. griceldaromero

    mmo Guest

    You should make a separate personal additional menu that is empty initially, load this in addition to the AUtoCAD's standard with the command MENULOAD, and then you can drag, drop customise and fool around in that separate personal menu as much as you like, without affecting or damaging the standard ACAD.MNS menu file.

    Below is the dummy-guide to do this:

    Step 1: Open Notepad (empty) and write the following line: ***MENUGROUP=MYOWN
    save this file as MYOWN.MNS for instance in map "C:\Program Files\AutoCAD 2002\Menus\" or any other convenient location where -and this is importaint- you have writing rights.

    Step 2: In Autocad 2002, choose pull-downmenu "Tools -> Customise -> Menus..." In dialog box "Menu Customisation" choose tab "Menu Groups". Click on button Browse... and locate file "MYOWN.MNS" in the map where you've saved it in step 1. Select it, click on button Open, then click on button Load. (This makes "MYOWN" appear in the list "Menu Groups:", under the standard menugroup "ACAD") Now you can close this dialog by clicking on button "Close".

    Step 3: Choose pull-downmenu "Tools -> Customise -> Toolbars..." In dialog box "Customize" (tab Toolbars) select -very important- "MYOWN" in the "Menu Group" list on the right half of the dialog box. After that, click on button "New.." Now you can enter a chosen name for your first new toolbar. Double check that "MYOWN" is selected under "Save toolbar in menu group" (We definitly don't want to save this in the ACAD menu group) Click on "OK" and "Close" to leave the dialog. Now, somewhere on your screen, there is a narrow gray rectangle with a x-symbol on top. This is your new toolbar, part of the separate "MYOWN" menu group. Its still empty and ready to recieve buttons that you drag towards it and customise.

    Tip: Avoid dragging something into the standard AutoCAD toolbars, for this wil lead to an attempt by the program to change the standard ACAD.MNS file, and you would not like this. The whole trick is to keep your customisations isolated from the standard menu files, and have your custom MYOWN.MNS menu file loaded as an additional menu next to the standard ACAD.MNS menu file.

    Hope that helps, with friendly greetings, M. Moolhuysen.
     
    mmo, Feb 12, 2004
    #5
  6. I did this and it created a new empty toolbar. When you drag a button to the new toolbar, is it supposed to add on to the toolbar? I tried this and nothing happens. What am I doing wrong? I have a new empty toolbar but i don't know how to add buttons to it.
     
    griceldaromero, May 4, 2004
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.