Print Page | Close Window

turn of layers -map key

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=11439
Printed Date: 07.May.2026 at 10:04


Topic: turn of layers -map key
Posted By: gegenytibor
Subject: turn of layers -map key
Date Posted: 27.Oct.2015 at 08:01
Hello Guys,

Is there a possibility to make a map key to turn off a group of layers at the same time (f.e. 8-10 layers)?

Thank you for your answer!
T



Replies:
Posted By: John Connor
Date Posted: 27.Oct.2015 at 10:23
It could probably be done using a macro or a lisp routine.


-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: Kent Cooper
Date Posted: 28.Oct.2015 at 14:29
Many options in the Layer command [command-line, not dialog-box, version] can take as many Layer names as you want, with comma separators.  So, an AutoCAD command macro would be like this:

'_.-Layer _off Layer1,Layer2,Layer3,LayerA,LayerB,LayerC,LayerTom,LayerDick,LayerHarry ;

The apostrophe at the beginning, and the lack of the ^C^C that you so often see used at the beginning of command macros to cancel any command that you may be in at the time, allows you to do it even within another command.  The underscore lets it work in other-than-English versions of AutoCAD.  The period forces it to use the native Layer command in case there's been any redefinition.  The hyphen suppresses the dialog box [you need that, but the preceding punctuation you can omit depending on your circumstances].  The colon at the end is an Enter to complete the Layer command -- other options could be added before that [turning some other Layer(s) on, setting a particular Layer current, etc.].



Print Page | Close Window