select ALL layout tabs

Discussion in 'AutoCAD' started by ajm, Aug 24, 2004.

  1. ajm

    ajm Guest

    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
     
    ajm, Aug 24, 2004
    #1
  2. ajm

    Doug Broad Guest

    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.
     
    Doug Broad, Aug 24, 2004
    #2
  3. ajm

    Jeff Mishler Guest

    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!!!!!!
     
    Jeff Mishler, Aug 24, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.