AutoCAD/how to create lisp

Advertisement


Question
I have 4 year expirence in autocad2D and now I am a student of MCA. Now I want to know how to create and load any lisp in Autocad.Please answer me.

Answer
Hema:  Lisp is a programming language and is best learned in a classroom setting.  However there is literature out there than can help.  A book called AutoLISP Programming Principles and Techniques by Rod Rawls & Mark Hagen is very helpful to start with.  After you get that down to where you're comfortable with it. there are other books for more advanced ActiveX functions which were implemented when Visual LISP was implemented by Autodesk.  Autodesk also has support groups for customization that help users with questions about LISP syntax and other customization questions.  That can be found here:
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/bd-p/130

 
AutoCAD provides three ways to load LISP files.  

1.  APPLOAD will load any application including LISP.  You can put some routines in the Startup Suite if you want them to automatically be loaded when you start AutoCAD.

2.  You can load a lisp routine with the lisp command (load .  If, example you want to load a lisp file called HEMA.LSP, then with the lisp file in the Support File Search Path, enter (load "hema") in order to load the routine.  

3.  If your AutoCAD installation supports this, there is often a LISP routine supplied and loaded to assist you in loading a LISP file.  To start the routine, type LSP at the command line. Next you will see the following on the command line:
Enter an option [?/Commands/Functions/Variables/Load]:
Now you can type L to load a routine.  That will take you back to #1 and will put you into the APPLOAD dialog.

Let me know if you have more questions.

Bill DeShawn
http://my.sterling.net/~bdeshawn

AutoCAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


Bill DeShawn

Expertise

I can address all 2-D questions and some 3-D questions. I do programming in AutoLISP if it doesn`t involve solid modeling. I can also address menu customization issues and can help you find answers to questions I can`t answer by taking your question directly to Autodesk via their newsgroups.

Experience

I used to do electronic and mechanical design for a flat panel monitor manufacturer, and now I do architectural drafting for an architect. I did and do AutoLISP and menu customization and take pride in making my lisp routines to do the work exactly the way the client likes them done.

Publications
I had a routine published in CADENCE magazine (no longer in publication and taken over by CADALYST). Some of my routines are published on my website at http://my.sterling.net/~bdeshawn

©2012 About.com, a part of The New York Times Company. All rights reserved.