Plotting all layout tabs within a drawing

Discussion in 'AutoCAD' started by Angelika Jaehrlich, Dec 4, 2004.

  1. I wrote a script file that will plot the current layout tab . Is there a way
    to plot all layout tabs within the drawing at once without using the batch
    plot utility? The script file I wrote is listed below.

    Thanks

    Gerrit Timmerman


    qsave
    cmddia
    0
    plot
    y

    pq_hp_dj1050c.pc3
    Oversize: ANSI D (landscape)
    Millimeters
    Landscape
    n
    E
    1:1
    Center
    y
    Mun_Full.ctb
    y
    y
    y
    n
    n
    n
    y
    cmddia
    1
    redraw
     
    Angelika Jaehrlich, Dec 4, 2004
    #1
  2. Angelika  Jaehrlich

    Don I Guest

    I didn't check YOUR code so I can't tell you if there are any problems
    there--but this should at the least get you started.
    (defun c:plotAllLayouts)
    ;returns a list of all layouts
    (setq laylist (layoutlist))
    (setq cnt -1)
    ;loop through layouts
    (repeat (length laylist)
    (setq cnt (1+ cnt))
    (setq lname (nth cnt laylist))
    (command "qsave")
    (setvar "cmddia" 0)
    (command "plot" "y" "pq_hp_dj1050c.pc3" "Oversize: ANSI D \(landscape\)"
    "Millimeters" "Landscape" "n" "E" "1:1"
    "Center" "y" "Mun_Full.ctb" "y" "y" "y" "n" "n" "n" "y")
    (setvar "cmddia" 1)
    (command "redraw")
    )
     
    Don I, Dec 5, 2004
    #2
  3. Don, thank you very much for the input. I will try the code tomorrow once I
    am at work

    Gerrit
     
    Angelika Jaehrlich, Dec 5, 2004
    #3
  4. Angelika  Jaehrlich

    machie01 Guest

    If you're sure all layouts are ok, you can print them with this one. I copied it from someone else over here. It will plot on alphabetic order.

    Gert Jan

    (defun c:pltall (/ actlay doc layouts plot)
    (setq doc (vla-get-activedocument (vlax-get-acad-object))
    actlay (vla-get-activelayout doc)
    layouts (vla-get-layouts doc)
    plot (vla-get-plot doc)
    )
    (vlax-for itm layouts
    (if (/= (strcase (vla-get-name itm)) "MODEL")
    (progn
    (vla-put-ActiveLayout doc itm)
    (vla-PlotToDevice plot)
    )
    )
    )
    (vla-put-ActiveLayout doc actlay)
    (princ)
    )
     
    machie01, Dec 5, 2004
    #4
  5. Angelika  Jaehrlich

    OLD-CADaver Guest

    OLD-CADaver, Dec 6, 2004
    #5
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.