LISP Files

If you didn’t know, CAD Masters does a lot of programming.  A long time ago, we wrote a lot of LISP files, nowadays we do a lot of Microsoft .NET programming.  Even though we write a lot of our software in .NET, we know that LISP has its place.  They are quick and straight to the point, hence why Drew is writing his series on the ACAD.LSP file.  Not only that, but there are so many useful free LISP files available on the internet that will do things that AutoCAD just cannot do easily out of the box.

When I first started at CAD Masters I wanted to get a basic understanding of writing LISP files.  I found that joining polylines together was a very tedious task and wanted to write a command to join them easier.  I ended up creating a pedit join LISP command to learn the basics.  The routine that I wrote will grab all the lines, arcs and polylines that touch end to end and join them together in a single click on an object.

Follow these steps to use the LISP file:

  1. Download the file (Right-click Save as or Save link as)
  2. Rename the file extension to (.lsp).
  3. Open AutoCAD.
  4. Type AP for APPLOAD at the command line.
  5. Select the file
  6. Click Load.
  7. Click Close.
  8. Type PEJ at the command line.
  9. Select a line that is adjacent to other lines and arcs, they are joined!

Take a look at the contents of the file in Notepad++, and consider how you might do something similar to make a repetitive or tedious task easier.

5 Comments
  1. Hey Kyle,

    The PEJ.txt command sounds pretty cool and I would like to use it on a daily basis. But when I clicked the “link” above the location is no longer available. Can you send it to me.

    Thanks, Jon

    1. Thanks for letting me know about that. The link only worked from the front page. I changed it to the full path and it should work now.

  2. Good Day!
    I am looking for a “.lsp” file that will prompt me through a drawing a beam. What I want is a dialog box driven beam program. IE, I type MB to start, a dialog box would open, and user input would be available to fill in. Beam size, work point length, hold back, cope for left and right ends, default holes per size – with ability to change. This would be a good start and I would like to mature the .LSP file further with other options as they arise. Is this possible with a LSP file or should it done this ideal be handled differently? Can You Help Me??

  3. I love what am reading but, am also looking for a lisp command that can do land subdivision easily

Leave a Reply

Your email address will not be published.

Back to blog

Copyright ©2017, CAD Masters, Inc.. All Rights Reserved.