Tag: lsp

  • Save And Close All Open AutoCAD Drawings

    Save And Close All Open AutoCAD Drawings

    Recently, I found myself having 10-15 AutoCAD drawings open at the same time and wanted to close them all.

    An easy way to do it is with two commands.

    To do so, first you type SAVEALL at AutoCAD’s command line and all the open documents are saved. Secondly, the CLOSEALL command follows that will close all the open drawings.

    But… I wanted something more automated. So I wrote a small script that combines those two commands into one that will automatically save and close all the drawings.

    Here’s the script:

    (defun c:SCALL ()
      (command "SAVEALL")
      (command "CLOSEALL")
      (princ)
    )

    That’s all. The file is named SCALL.lsp and the command to run it is also “scall” typed at the command line of AutoCAD.

    If you want to know how to load an AutoLISP script in AutoCAD you can read this small article that teaches you step by step what you should do.

  • Importing and Exporting point files to AutoCAD

    There is often the need to import and export points in AutoCAD. Despite the fact that Civil 3D has an integrated tool for this kind of work, AutoCAD doesn’t. But, don’t be disappointed or try doing this thing manually. There are some ways to import and export points from AutoCAD too, even if we have to use some DIY stuff. (more…)

  • 5 Great AutoLISP Scripts

    I decided to post my favorite AutoLISP programs that I use extensively hoping that someone will find them useful. The two of them (as you can see in the code that I am providing) are written by me and their coding is very easy to understand and changed/tweaked (if someone has a bit of knowledge about AutoLISP). There are other two without their code provided by their authors but they are great (.vlx extension). Scripts can also be downloaded all together from here. (more…)

  • How to load AutoLISP code in AutoCAD

    If you do not know how to load LISP scripts in Autocad there are several ways. (more…)