| Author |
Message |
Kiwi Russ
Guest
|
Posted:
Mon Dec 20, 2004 11:24 am Post subject:
Batch plot pdf's |
|
|
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
|
|
| Back to top |
|
 |
Rob Taylor
Guest
|
Posted:
Mon Dec 20, 2004 4:11 pm Post subject:
Re: Batch plot pdf's |
|
|
have u try
"._-plot" instead of "-plot" |
|
| Back to top |
|
 |
Harold Leveritt
Guest
|
Posted:
Mon Dec 20, 2004 4:57 pm Post subject:
Re: Batch plot pdf's |
|
|
You should be setting cmddia to zero.
|
|
| Back to top |
|
 |
Doug
Guest
|
Posted:
Tue Dec 21, 2004 3:04 am Post subject:
Re: Batch plot pdf's |
|
|
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
"Kiwi Russ" <russell@pl.net> wrote in message news:41c67032_3@newsprd01...
| Quote: | 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
|
|
|
| Back to top |
|
 |
Kiwi Russ
Guest
|
Posted:
Wed Dec 22, 2004 1:59 pm Post subject:
Re: Batch plot pdf's |
|
|
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 |
|
| Back to top |
|
 |
Dommy2Hotty
Guest
|
Posted:
Wed Dec 22, 2004 10:48 pm Post subject:
Re: Batch plot pdf's |
|
|
| 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"). |
|
| Back to top |
|
 |
hulioman
Guest
|
Posted:
Thu Dec 23, 2004 12:38 am Post subject:
Re: Batch plot pdf's |
|
|
| 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. |
|
| Back to top |
|
 |
Kiwi Russ
Guest
|
Posted:
Thu Dec 23, 2004 12:25 pm Post subject:
Re: Batch plot pdf's |
|
|
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 |
|
| Back to top |
|
 |
Doug
Guest
|
Posted:
Thu Jan 13, 2005 12:52 am Post subject:
Re: Batch plot pdf's |
|
|
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
"Kiwi Russ" <russell@pl.net> wrote in message news:41c9376f_2@newsprd01...
| Quote: | 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
|
|
|
| Back to top |
|
 |
|
|
|
|