Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Colors for Live Layers

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
177 Views, 3 Replies

Colors for Live Layers

So far I have: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun construct_layer_list ( / temp-list temp ) (setq temp-list nil) (setq temp (tblnext "layer" T)) (while temp (if (not (wcmatch (cdr (assoc 2 temp)) "*|*")) (setq temp-list (cons (cdr (assoc 2 temp)) temp-list)) ) (setq temp (tblnext "layer")) ) (if temp-list (acad_strlsort temp-list)) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; What i need is some hints to acomplish that part of the function which will take all of those layers that are not Xref layers and change the property value to a specific color lets say 10. Any help is appreciated thanks Richard
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

To convert all non-xref layers to color 10: (command "_.layer" "_c" "10" "~*|*" "") Of course, that alone will not guarantee that xref layers are also not color 10. "RichardG" wrote in message news:41fe80b4$1_3@newsprd01... > So far I have: > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > (defun construct_layer_list ( / temp-list temp ) > (setq temp-list nil) > (setq temp (tblnext "layer" T)) > (while temp > (if (not (wcmatch (cdr (assoc 2 temp)) "*|*")) > (setq temp-list (cons (cdr (assoc 2 temp)) temp-list)) > ) > (setq temp (tblnext "layer")) > ) > (if temp-list (acad_strlsort temp-list)) > ) > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > What i need is some hints to acomplish that part of the function which will > take all of those layers that are not Xref layers and change the property > value to a specific color lets say 10. > Any help is appreciated thanks > Richard >
Message 3 of 4
t.willey
in reply to: Anonymous

(foreach item temp-list
(command "_.layer" "c" 10 item "" "" "")
)

I'm sure there is a better way, but this will work.
Tim
Message 4 of 4
Anonymous
in reply to: Anonymous

Thanks gentlemen "T.Willey" wrote in message news:27979888.1107199576801.JavaMail.jive@jiveforum1.autodesk.com... > (foreach item temp-list > (command "_.layer" "c" 10 item "" "" "") > ) > > I'm sure there is a better way, but this will work. > Tim

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost