Jump to content
Pattosun

Batch Plot to PDF using only dwg filename and save to same folder as dwg

Recommended Posts

Pattosun

I would like to batch plot 200 drawings to individual PDFs and for them to save automatically as the original DWG filename, and save to the same folder as the original DWG file... Is this possible?

 

I am a Microstation user boo hiss, haha..... and it is quick and easy to do this with DGNs in Microstation V8i using the Print organiser. I'm sure something similar must be available in AutoCAD but I haven't found it yet. I have tried publishing but it saves the file with the layout name swell so I then have to go through 200 PDFs and rename them.... 

 

Any ideas? Thanks in advance, Patto

Share this post


Link to post
Share on other sites
maratovich

Much depends on how you created the files.
Is there a print setting? One layout or more?
Best of all attach a sample file or image.
There are a lot of solutions, but it depends on the source data.

Share this post


Link to post
Share on other sites
BIGAL

Like maratovich I have posted previously a plot layout range lisp here that saves the pdf's one level below dwg plotting individual then combining them into 1 pdf. It does rely on the fact that only 1 title block exists this way plot area is known.

 

Its pretty easy to make a lisp that does plot all layouts and combined with a script will plot as many as you need.

 

Need a sample file with title block.

Not tested code cut from a plot range pdf


; this is the code to plot a pdf the pdfname variable is pulled from the dwg. Its hardcoded for title size.
; you save it and use it with a script
(defun plotpdf ( / dwgpre layouts lay layname)
(setq dwgpre (strcat (getvar "dwgprefix") "\pdf"))
(SETQ LAYOUTS (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object))))
(vlax-for lay LAYOUTS
(setq layname (vla-get-name lay))
(if (/=  layname  "Model")
(progn
  (setvar 'ctab layname)
  (setq pdfname (strcat dwgpre "\\" dwgname "-" layname ".pdf" ))
  (COMMAND "-PLOT"  "Y"  "" "dwg to Pdf"
           "Iso full bleed A3 (420.00 x 297.00 MM)" "m" "LANDSCAPE"  "N"   "W"  "-6,-6" "807,560" "1=2"  "C"
           "y" "Your plotter settings here.ctb" "Y"    "n" "n" "n" pdfName "N" "y"
  )
)
)
)
(princ)
)
(plotpdf)

script


open dwg1 (load "plotpdf") close n
open dwg2 (load "plotpdf") close n
open dwg3 (load "plotpdf") close n

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×