Batch plot pdf's

Discussion in 'AutoCAD' started by Kiwi Russ, Dec 20, 2004.

  1. Kiwi Russ

    Kiwi Russ Guest

    I'm writing a little program that should batch plot pdf's
    Unfortuately a dialog box appears even though Filedia=0
    How can I get rid of this?
    I have used similar code below to batch plot dwf's and it works fine.
    thank if you can help
    Russ



    (if (equal Printer "TESTPDF")
    (progn
    (setq layouts_to_plot (dos_multilist "Plot Layouts" "Select layouts"
    (layoutlist)))
    (setq NumTabs (length layouts_to_plot))
    (foreach LLN layouts_to_plot
    (layoutlist)
    (setvar "CTAB" LLN)
    (setvar "FILEDIA" 0)
    (command "-plot" "NO" "" "" "TESTPDF.pc3" LLN "NO" "YES" );problem
    here why does dialog box appear?
    );foreach
    );progn
    );if
     
    Kiwi Russ, Dec 20, 2004
    #1
  2. Kiwi Russ

    Rob Taylor Guest

    have u try

    "._-plot" instead of "-plot"
     
    Rob Taylor, Dec 20, 2004
    #2
  3. You should be setting cmddia to zero.
     
    Harold Leveritt, Dec 20, 2004
    #3
  4. Kiwi Russ

    Doug Guest

    I use a CMD file (new name for Batch file) and a script file for that. It
    prints all the DWG's in the directory where it's run to PDF and then deletes
    the DWG's. However, it uses a PDF printer driver that looks like a printer
    or plotter to Autocad. It's called GhostScript, but it was installed here
    before I got here and I don't know where to get it or how to install it.

    Here's BatPDF.CMD:

    FOR %%G in (*.DWG) DO "C:\Program Files\AutoCAD 2004\acad.exe" "%%G" /b
    BatPDF.scr
    shift
    del *.dwg


    And here's BadPDF.SCR

    -plot
    y

    Create PDF.pc3
    B 11"x17"
    Inches
    Landscape
    No
    Extents
    Fit
    Center
    Yes
    monochrome.ctb
    Yes
    A
    No
    No
    Yes
    Quit
    y



    Hope that helps!
    I use an almost identical one for printing all the files in the directory to
    a laser printer, too. Just the line saying "Create PDF.pc3" changes to the
    printer's PC3 file.

    Doug VanderLaan

    An encouraging word for beginners: Remember, Amateurs built Noah's Ark but
    Experts built the Titanic.

    (7th St. Engineering)

    AAR Mobility Systems

    201 Haynes St.

    Cadillac, MI 49601

    Phone: (231) 779-6314

    http://www.aarcorp.com/manufact/mobility.html
     
    Doug, Dec 20, 2004
    #4
  5. Kiwi Russ

    Kiwi Russ Guest

    Thanks Doug
    I am not sure how use your BatPDF.CMD

    I don't understand this part:

    FOR %%G in (*.DWG) DO "C:\Program Files\AutoCAD 2004\acad.exe" "%%G" /b
    BatPDF.scr
    shift
    del *.dwg

    thanks Russ
     
    Kiwi Russ, Dec 22, 2004
    #5
  6. Kiwi Russ

    Dommy2Hotty Guest

    It's a DOS batch file...copy/paste it into Notepad and save it with a .bat extension. Then copy that batch file into the folder with your drawings you want to batch plot, then double click to run it. You'll need the BatPDF.scr in the same folder, unless you change to batch file to specify it in a certain place (i.e. "Z:\Script\BatPDF.scr").
     
    Dommy2Hotty, Dec 22, 2004
    #6
  7. Kiwi Russ

    hulioman Guest

    You can batch plot from lisp using the plot command and script the file to create pdf's. There is a trick to not getting the acrobat dialog. In your line with the plot command, make sure you say yes to <PLOT TO FILE>. It wil create a 0kb plot file (which you can delete) and it wil create the pdf file without bringing up the dialog.
     
    hulioman, Dec 22, 2004
    #7
  8. Kiwi Russ

    Kiwi Russ Guest

    Thanks but...
    I tried the script and batch file, but I can't get it to work
    stops at the dos dialog box.
    Is there a way to do it in lisp? As I understand a plt file has first to be
    created then from the plt a pdf is made?
    cheers Russ
     
    Kiwi Russ, Dec 23, 2004
    #8
  9. Kiwi Russ

    Doug Guest

    As Dommy said, it's a DOS batch file. It loads a drawing into Autocad and
    prints it, quits Autocad. Then it starts over for the next drawing in the
    directory and continues printing until they're all done.

    Repeating the previously posted instructions:

    Create a new, empty text file with Notepad.
    Insert the lines

    FOR %%G in (*.DWG) DO "C:\Program Files\AutoCAD 2004\acad.exe" "%%G" /b
    BatPDF.scr
    shift
    del *.dwg

    in the file, then save it.
    Now rename the file to BatPDF.BAT

    and double-click on it. If you have a PDF print driver in your autocad
    installation, this and the BatPDF.SCR file will send all the dwg files in
    the current directory to the PDF printer and then DELETE all the dwg files.

    Doug
     
    Doug, Jan 12, 2005
    #9
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.