Jump to content

changing all layers to grey


Recommended Posts

Posted

Does anyone know how I can change the color of all layers at once to the same color easier then what I'm doing now?...I open the layer manager, select all layers, click on the color and edit it globally there. Then I exit out of the layer manager....is there a routine that would do it with way less steps?...I'd try and create one but I've tried in the past and always seem to screw it up...Maybe someone knows of something already created..

 

Thanks

Posted

If you can handle a bit of typing, use the keyboard and type the characters in red , with a few Enters.

 

Command: -la

-LAYER

Current layer: "0"

Enter an option

[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]: c

 

Enter color name or number (1-255): 8

 

Enter name list of layer(s) for color 8 : *

Enter an option

[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:

Posted

Written quickly:

 

(defun c:ChangeAllLayersColor (/ color)
 (princ "\nSelect replacement layer color: ")
 (if (setq color (acad_colordlg 1 nil))
   (command "._-layer" "color" color "*" "")
 )
 (princ)
)

 

... This not only adds a layer of context via color select dialog, but also supports LAYERP, and UNDO Command functionality as well.

Posted
Great. Thanks

 

You're welcome; I'm always happy to help. :beer:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...