Set All Layer's VP Color in all Viewports to Color 8

Set All Layer's VP Color in all Viewports to Color 8

josephsante
Explorer Explorer
330 Views
3 Replies
Message 1 of 4

Set All Layer's VP Color in all Viewports to Color 8

josephsante
Explorer
Explorer

Is there a lisp to Set VP Colour in all Viewports to Gray?

 

And if possible, with exceptions to specific layers.

If not, I can reset them manually.

 

Thanks

0 Likes
Accepted solutions (1)
331 Views
3 Replies
Replies (3)
Message 2 of 4

Kent1Cooper
Consultant
Consultant

If you want a Layer to be gray [separate issue -- which gray?] in all Viewports, can't you just change its main-Layer-settings color to gray, and leave it alone in the Viewports?  Or do you perhaps already have other VP-override color settings for that Layer in some Viewports?

Kent Cooper, AIA
0 Likes
Message 3 of 4

josephsante
Explorer
Explorer

@Kent1Cooper I mean the VP Colour Override. I would like to set them all to colour 8 by Lisp. VP Color Override.png 

 

 

0 Likes
Message 4 of 4

ВeekeeCZ
Consultant
Consultant
Accepted solution

Possibly like this..

 

(defun c:VPColorAllGray ( / c)
  (if (setq c (= (getvar 'tilemode) 1)) (setvar 'tilemode 0))
  (command "_.vplayer" "_c" 8 "*" "_a"
	   "_m" "_c" "0,MyColorfulLayer,Secondone,Third" "_a" "")
  (if c (setvar 'tilemode 1))
  (princ)
  )