You are here:

AutoCAD/creating a lisp routine

Advertisement


Question
I am trying to create a lisp routine that I can turn off a group of mutiple layers with only 2 key strokes.  

Answer
sorry, I've been on vacation.
you need to use notepad or similar and save the routine to a file with a .lsp extension.
it will look something like this:
(defun c:aa ()
(command "layer" "off" "your layername here" "")
)
you can add to the layer off part repeatedly, as if you were typing in the commands at the command line..

AutoCAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scott Cook

Expertise

I`ve been using AutoCAD since 1987 and programming AutoLISP nearly as long. I can answer questions about programming AutoCAD (except ARX) and production enhancement techniques. I cannot answer questions about AutoCAD crashes or DWG corruption. AutoCAD PROGRAMMING (menus, lisp) related questions only!

Experience

Since 1987. Author of Plot2000 software for for AutoCAD, http://www.plot2000.com. PROGRAMMING QUESTIONS ONLY PLEASE. Questions that are NOT related to programming or AutoCAD customization (menus and lisp only please) are outside the scope of my volunteer services and will NOT BE ANSWERED.

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