select ALL layout tabs

  • Thread starter Thread starter ajm
  • Start date Start date
A

ajm

Could anyone advise me as to how to select ALL layout tabs via lisp.
I have hundreds of drawings I need to strip ALL layouts from, and I need to do it via lisp, to run in a batch routine.

T.I.A.
Andrew McDonald
 
You don't need to select all layouts at once.

(vlax-for layout (vlax-get-layouts(vla-get-activedocument(vlax-get-acad-object)))
;;do something with layout

)

Stripping all layouts without knowing what is on each one sounds kind of
severe, even dangerous. Be careful.
 
As long as I've seen Doug's posts on this forum, this is the first time that
I've been able to correct something he posted.... ;-)
(vlax-for layout
(VLA-get-layouts(vla-get-activedocument(vlax-get-acad-object)));;Doug had
vlax-get-layouts.....

and to expand, inside that vlax-for, a simple (vla-delete layout) will
remove it. But I must emphasize what Doug pointed out: BE CAREFUL!!!!!!
 
Back
Top