Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SDETERS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a simple way of automating layers on/off...

Status
Not open for further replies.

sp1ke727

Mechanical
Jun 24, 2005
44
I'm using AutoCAD 2002. Yes I know I'm dated.

This is what I'm trying to do. Let say you have layer a and layer b on. By those being on autocad will automatically shut off or freeze layer c and layer d and vice versa.

Is there an easy way to do this without having to write a lisp routine?
 
Replies continue below

Recommended for you

Look into Layer Filters.

_________________________________________
NX8.0, Solidworks 2014, AutoCAD, Enovia V5
 
I figured it out. You can save and name current layer states. Restore them from a list in the layer properties manager.

Right in front of my face. Thanks for the help.
 
You can also define some quick lisp functions. Add the lines below in your ACAD.lsp file. Restart Autocad. Type L1 or L2 to make them work. Modify as needed.


(DEFUN C:L1 ()
(COMMAND "LAYER" "OFF" "A,B" "")
(COMMAND "LAYER" "ON" "C,D" "")
)

(DEFUN C:L2 ()
(COMMAND "LAYER" "On" "A,B" "")
(COMMAND "LAYER" "Off" "C,D" "")
)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor