if the layer plot is no make the layer freeze

if the layer plot is no make the layer freeze

S_S_SS
Advocate Advocate
370 Views
2 Replies
Message 1 of 3

if the layer plot is no make the layer freeze

S_S_SS
Advocate
Advocate

Hello every one 
I need I lisp to make freeze for all the layers that plot is no 

mostafahisham62_0-1650699124157.jpeg

and thanks in advance 

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

pbejse
Mentor
Mentor
Accepted solution

@S_S_SS wrote:

Hello every one 
I need I lisp to make freeze for all the layers that plot is no 

mostafahisham62_0-1650699124157.jpeg

and thanks in advance 


(defun c:FNP (/ clay aDoc)
  (setq	clay   (getvar 'Clayer)
	Layers (vla-get-layers
		 (setq aDoc (vla-get-ActiveDocument (vlax-get-acad-object)))
	       )
  )
  (vlax-for lay	Layers
    (if	(and
	  (/= clay (vla-get-name lay))
	  (zerop (Vlax-get lay 'Plottable))
	)
      (vlax-put lay 'Freeze -1)
    )
  )
  (vla-regen aDoc acActiveViewport)
  (princ)
)
Message 3 of 3

S_S_SS
Advocate
Advocate

Thanks sir ....

0 Likes