Assign random true colors to layers

Assign random true colors to layers

Anonymous
Not applicable
1,360 Views
1 Reply
Message 1 of 2

Assign random true colors to layers

Anonymous
Not applicable

Hello,

 

Here's the deal;

 

I have more than 3000 text each on a different layer, I'd like to assign to each layer a different color excluding black and white, is this possible?

 

thanks

0 Likes
Accepted solutions (1)
1,361 Views
1 Reply
Reply (1)
Message 2 of 2

dbhunia
Advisor
Advisor
Accepted solution

Try this.....

 

(defun c:lac ( / n la )
(vl-load-com) (setvar 'cmdecho 0) (setq n 1) (vlax-for layer (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) (if (= n 255)(setq n 1)) (setq la (vla-get-name layer)) (vl-catch-all-apply 'vl-cmdf (list "_.LAYER" "_Color" n la "")) (setq n (+ n 1)) ) (setvar 'cmdecho 1) (princ) )

Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes