LISP Enabled CAD — And So What?

First ask yourself why other commercial CAD software like AutoCAD, DraftSight and others, have no customization capabilities for free. LISP (AutoLISP in AutoCAD) is one of the most powerful customization features found in AutoCAD. But only one problem is that AutoLISP is not available in AutoCAD LT (lite low-price version of full AutoCAD). Every neighbourhood has a LISP programmer cause LISP is one of the oldest programming languages and it’s very easy to learn. Even non-programmer can learn to write LISP routines to automate and speed up his CAD work. If you don’t know how to write lisp function then you can find millions of lisp routines on internet for free.

BabaCAD was among the first to have LISP programming support. It’s also AutoCAD AutoLISP compatible in most cases. LISP is available as AddOn/Extension module and you can download latest updated version on http://www.babacad.com/bem

I found that I’ve forgot to include option of changing layer for multiple selected objects in last BabaCAD release 1.3. I will fix this in next BabaCAD release, but I will give here temporaray solution using LISP. Just copy this lisp function to chlayer.lsp (open notepad and copy/paste and save as CHLAYER.LSP). You can set lsp file to automatically load on startup or manually load using command APPLOAD. You can even assign your custom icon and toolbar to your LISP command by editing bcad.mnu file in BabaCAD/Support folder.

(defun c:chlayer (/ lyr ss en ind)
 (setq lyr (getstring “Type existing layer name to change to: “))
 (setq ss (ssget))
 (setq ind 0)
 (while (setq en (entget (ssname ss ind)))
  (setq en (subst (cons 8 lyr) (assoc 8 en) en))
  (entmod en)
  (setq ind (+ ind 1))
 )
 (princ)
)
(princ “chlayer.lsp by Mirza Coralic. Type chlayer to change object’s layer.”)