×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

LISP

LISP

(OP)
I want to add a toolbar button to run my Lisp program.  Any help on how to do this????

Thanks

Kurt

RE: LISP

Hi Kurt,

Here is what I do. First make sure that you know where your lisp program is located. Next, start Autocad and right-click on any toolbar. In the gray dialog box, click "NEW" and name the new toolbar what you want, then click "OK". (You can also add the new button to an existing toolbar) Your new toolbar will show up in the list with an "X" next to it. There will also be a small empty toolbar somewhere on your screen with the name that you just typed in. That is your new toolbar. Now, click the "CUSTOMIZE" button. Next, in the flyout box that says "Attribute", click on the down arrow and scroll to "CUSTOM". Drag a blank button onto your new toolbar. Now, right click on the new blank button. This opens up yet another dialog box where you can name the LISP program and add the command to activate when you click on the button. In the lower white box you will see "^C^C". These are "Control C's" which will cancel any commands that are currently running when you press the button. directly after the second C (without a space) type the LISP routine's command that will make it run. On the right side of this dialog box there is an area that you can draw a custom button face that will remind you of the command that this button activates. Draw the button face and save it, click on "APPLY" and the button now shows the new face. If you APPLOAD your LISP program and close out all dialog boxes except your new toolbar, then you are ready to go.

Extra hint... If you add the correct LISP code in your ACAD.lsp file (different spelling for different versions) then your new LISP program will be automatically loaded each time that you open a new drawing, making your new toolbar ready to run. If you do not add the code, you can still use the button after you "APPLOAD" the LISP program.

Hope this helps,
Paul

RE: LISP

(OP)
Forgot to mention that I am using AutoCad 2002....

RE: LISP

(OP)
PLB Thanks for the Help....I got it all figured out but one thing.  When I change the Button Pic and draw a new one to use I can't get it to stay. When I exit Autocad and restart it places a different button pic there, but the Button still works to my new lisp command....

Thanks Kurt

RE: LISP

Hi Kurt,

I think the problem with the new Button faces is that they may be stored in a different directory that is not listed under your "Search Path" settings. Check this first, If they are there, try saving the new button faces over the old face names (with saveas).

Hope this helps,
PLB

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources