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.

This entry was posted in AutoCAD and tagged , , , . Bookmark the permalink.

2 Responses to LISP Files

  1. Jon Clugston says:

    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

    • Kyle Kondo says:

      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.