Chicane_Apex Posted yesterday at 10:03 PM Posted yesterday at 10:03 PM Hi All, I have multiple individual dwg files, would like to plot in individual pdf's. Is there any lisp file which can make this task automated? Quote
SLW210 Posted 12 hours ago Posted 12 hours ago Are you using AutoCAD LT 2026 as shown in your profile? Modelspace, paperspace or both? A lot of LISP for plotting around on the WWW, not sure how LT friendly they are. Have you looked or tried any? Does LT have Batch Plot - Publish? AutoCAD 2022 Help | About Publishing | Autodesk AutoCAD 2022 Help | To Publish a List of Drawings to PDF | Autodesk LISP to Batch plot (Publish) Multiple .dwg Models into One PDF - Autodesk Community Batch plot to pdf for DWG and layouts with different path and name - AutoLISP, Visual LISP & DCL - AutoCAD Forums Quote
Steven P Posted 6 hours ago Posted 6 hours ago (edited) BigAl loves his scripts and I suspect has one to copy and paste in here... though if you search this forum as well there are plenty of pdf and batch examples, just need to put them together. I have a PDF LISP (type in "plotPDF" and it creates a PDF in the drawings folder). Regardless what you are doing, typing 7 characters is a lot faster than the menu for PDF, select save folder and so on - so well worth finding one of these on the internet. As a side comment here set up a separate plotter for PDFs without the 'preview' check box - makes things better. The essence of the batch process is to create a script, saved as for example "MyScript.scr" (remember to set the file type to *.* so it saves right as a scr) Here is an example, copy, paste and change for each file you want to plot _.OPEN "YOUR_FILE_PATH_AND_FILE_NAME.dwg";;OPens the file (load "YOUR_PLOTTING_LISP_FILE_PATH_AND_FILE_NAME.lsp");;Loads the LISP (setvar "ctab" (nth 0 (layoutlist)));;Go to layout '0' (first layout in the layout list) (YOURPDFPLOTTINGLISP) (OR 'YOURPDFPLOTTINGLISP' );;do the plotting (if (= dbmod 0) (command ".close"));;if file not modified close (if (/= dbmod 0)(command ".close" "y"));;if file modified close and "OK to cancel changes" Then in a CAD file run the script We should one day find the time to make this nice, user friendly and a sticky thread the number of times this gets asked over the years... one day... Edited 6 hours ago by Steven P 1 Quote
BIGAL Posted 1 hour ago Posted 1 hour ago (edited) Just a comment over at Autodesk forum I posted some code to plot all dwg's in a certain directory to one pdf using publish. It has a bug though if the dwg's do not have the correct page setup saved, they don't plot. It uses OBDX to make the page setup but that is the point where I have a problem, setting the pagesetup to a known saved name. Still working on it. Using a script may be easier for the moment as can plot the pdf for each dwg then use via lisp Ghostscript to join them back into one. The only downfall is the script will open every dwg to process. I have the code for layouts into one pdf so will look at using a script in that code. The post at Autodesk wants only Model space plotted. The pdf's are located in a \PDF directory under the current dwg directory. Edited 1 hour ago by BIGAL Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.