Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Goodday,
I have to change the layer colour of almost 600 drawings, these layers have to be within the range of colour 1-8.
I like to change the colours 9 till 250 into colour code 1 (Red). is this possible?
It has to be in lisp because i'm using Dynamo to do multiple actions at once.
this is the LISP i've got so far, capable of changing 1 colour at once (created by @Lee_Mac )
(defun c:dolayers ( / name ) (vlax-for layer (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) (if (and (= 2 (vla-get-color layer)) (not (wcmatch (setq name (vla-get-name layer)) "Z-*")) (not (tblsearch "LAYER" (setq name (strcat "Z-" name)))) ) (progn (vla-put-color layer 100) (vla-put-name layer name) ) ) ) (princ) ) (vl-load-com) (princ)
Thanks in advance,
i've posted this in the wrong section i think, with no idea how to change it
Solved! Go to Solution.