Sign in to follow this  
Followers 0
kyle

AutoCAD plotting

18 posts in this topic

Does anyone know how to print off multiple autocad dwg files with the same plot settings to the same printer without having to open every drawing in autocad? The reason for this is i have to print over 100 dwg files. Any help would be great. I searched autocad help and found information about spooling, but was unable to go anywhere with this. Is there an easier way or does someone know of a better guide than the directions for spooling in autocad help? Is spooling even the best way to go about doing this?

Share this post


Link to post
Share on other sites
we normally use batch script and pipe information to acad so it does exactly what we want. one of these days if i ever get some time, i would like to write VB program to make this even better but i'm too busy/lazy and this works. it is easy to have bunch of scripts like for printer1, printer2, purge_blocks, explode_everything, save_as_R14_version etc. setting up scripts does take a bit of time (5-15min) but once you get it done it's such convenience and it can be reused for any other project. debugging script is so much faster if you use virtual printer such as CutePDF for example (doesn't waste toner and paper either). for example, open ACAD with some drawing, issue all commands from command line then save the command line history as script (just a text file such as "plot_scr.txt" or whatever). then create batch file that will call acad with file name and script. make a loop (FOR NEXT or whatever) or just straight list of files (easily generated with excel). sample script is PLOT_PDF.TXT FILEDIA 0 ZOOM EXTENTS -PLOT ;Detailed plot configuration? [Yes/No] <No>: Y ;Enter a layout name or [?] <Model>: Model ;Enter an output device name or [?] <your_default_printer>: your_Printer2 ;Enter paper size or [?] <Letter>: Tabloid ;Enter paper units [Inches/Millimeters] <Inches>: Inches ;Enter drawing orientation [Portrait/Landscape] <Landscape>: Landscape ;Plot upside down? [Yes/No] <No> No ;Enter plot area [Display/Extents/Limits/View/Window] <Extents>: Extents ;Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <Fit>: Fit ;Enter plot offset (x,y) or [Center] <0.10,0.00>: 0.20,0.00 ;Plot with plot styles? [Yes/No] <Yes>: Yes ;Enter plot style table name or [?] (enter . for none) <monochrome.ctb>: monochrome.ctb ;Plot with lineweights? [Yes/No] <Yes> Yes ;Remove hidden lines? [Yes/No] <No>: No ;Write the plot to a file [Yes/No] <N>: No ;Save changes to model tab [Yes/No]? <N> No ;Proceed with plot [Yes/No] <Y>: Y FILEDIA 1 Quit sample batch file can be something like this PLOT_PRINTER2.BAT acad.exe "my_project__page1.dwg" /b "Plot_PDF.txt" acad.exe "my_project__page2.dwg" /b "Plot_PDF.txt" acad.exe "my_project__page3.dwg" /b "Plot_PDF.txt" acad.exe "my_project__page4.dwg" /b "Plot_PDF.txt" acad.exe "my_project__page5.dwg" /b "Plot_PDF.txt" acad.exe "my_project__page6.dwg" /b "Plot_PDF.txt" acad.exe "my_project__page7.dwg" /b "Plot_PDF.txt" acad.exe "my_project__page8.dwg" /b "Plot_PDF.txt" acad.exe "my_project__page13.dwg" /b "Plot_PDF.txt" del /q *.bak to make list of DWG files which are not sequential (like when supplied by customers etc.), I also pipe DIR command output to file like this (this is why I have "open in dos" on my explorer right click menu): dir /b *.dwg > dwg_files.txt you can also do more like sort it if you are familiar with DOS or just do it in excel... these two files must be in same folder with the drawings. to use the for another set of files it is enough to open BAT file for editing, and search and replace (Ctrl+H) "my_project" with "my_new_project". voila.. btw. directory with ACAD.EXE must be listed in PATH variable of your OS. final note - if you use this particular script and batch combo, make sure that ACAD is not open when you start batch file. in this particular case ACAD will be open and closed for each drawing but it's rather fast (on my pc it's 3-4 files per second). of course you can change script so ACAD is not loaded and closed every time. this is just to give you idea. if someone has better or different idea, i'm listening.

Share this post


Link to post
Share on other sites
1) Is there a way to select the default value for one of the prompts and repeat this in the batch file? - the default value can be selected by spacebar or enter but if one of the options such as ";enter an output device name or [?] <your_default_printer>: your_printer2" in my list of drawings the your_default_printer value changes so is there a way that i can select whatever the default value is for each file? 2) You mentioned the command line history as plot_scr.txt and sample script is plot_pdf.txt are these meant to be the same file name 3) I havent had much time to look over creating the batch file and am uncertain as to whether i need to go about placing the dir /b *.dwg > dwg_files.txt in the same plot_printer2.bat 4) what do you mean by directory with acad.exe must be listed in path variable of your os? where does this need to be listed in the batch file? Otherwise the first part of your code and everything else i think is really going to help thanks alot

Share this post


Link to post
Share on other sites
1) Is there a way to select the default value for one of the prompts and repeat this in the batch file? - the default value can be selected by spacebar or enter but if one of the options such as ";enter an output device name or [?] <your_default_printer>: your_printer2" in my list of drawings the your_default_printer value changes so is there a way that i can select whatever the default value is for each file? Space only works for some prompts, if moving finger from one button to another is too much make sure to use Enter key. press question mark to see selection or simply copy and paste printer name... (go to control panel, printers, click on printers, press F2 for rename, printer name will be highlighted, press Ctrl+C and then Esc.... highlight line "your_printer2" in the script and press Ctrl+V to paste correct printer name.). 2) You mentioned the command line history as plot_scr.txt and sample script is plot_pdf.txt are these meant to be the same file name they are the same, name it what ever you want to 3) I havent had much time to look over creating the batch file and am uncertain as to whether i need to go about placing the dir /b *.dwg > dwg_files.txt in the same plot_printer2.bat no, forget about it. this line would make a list of files to save you typing. for example here is list of all DLLs in my C:\Windows\System folder avicap.dll avifile.dll commdlg.dll CTL3D32.DLL io.dll lzexpand.dll mmsystem.dll msvideo.dll olecli.dll olesvr.dll SETUPKIT.DLL shell.dll tapi.dll VBRJP200.DLL ver.dll instead of DLLs those could have been DWGs sent by customer and there could be a lot more of them. i would hate to look into explorer and type all those names. too much work and it's so easy to make mistake. now open dos box and type DIR see what you get, then type DIR /B and note the difference. then type DIR /B > new_file_list.csv the ">" sign is pipe forwarding result that used to appear on the screen, into a text file. in this example this file was named new_file_list.csv (or you can use TXT extension, doesn't matter). open this file and think how long it would take to type all this. as said, you can pick any name, if it ends with CSV you can open it in excel directly. if it ends with TXT you can open it notepad for example. (smart guys put shortcut to notpad into their Send To directory so they can look inside of any file.) if you know how to use simple string manipulation or search and replace you can easily generate sequence of commands that will be saved in your BAT file. this is the only reason to make the file list - to reduce typing of every file name. you could also write a simple loop that prints all DWG files in directory etc. and use wildcards like "*" but this is your choice. i only offered solution that might save time. it does for me but of course one has to learn a bit about computers. i find generating and sorting lists important part of the process because as much as i like to generate drawing set with one mouse click (ok, it's a double click) i hate to sort printed pages by hand if they happen to come out randomly. 4) what do you mean by directory with acad.exe must be listed in path variable of your os? where does this need to be listed in the batch file? use Google to check keywords like PATH and VARIABLE. PATH is system variable that tells operating system (OS) where to look for frequently used commands or programs. if you open DOS box and type commands like DIR, FDISK or FORMAT C:, OS will check in those folders if such command or program can be found. you don't have to set PATH variable if don't mind specifying absolute path such as C:\Program Files\Some Fancy Program\executable.exe if the path "C:\Program Files\Some Fancy Program\" was listed in PATH variable, it would be enough to type EXECUTABLE or EXECUTABLE.EXE to start it because OS would find it thanks to PATH. if you don't want to mess with PATH, generate BAT file that will include absolute path, something like c:\Program Files\Autodesk\acad.exe "drawing1.dwg" /b "Plot_PDF.txt" c:\Program Files\Autodesk\acad.exe "drawing2.dwg" /b "Plot_PDF.txt" c:\Program Files\Autodesk\acad.exe "drawing3.dwg" /b "Plot_PDF.txt" hope this helps. gees, this got lenghty, it looks almost like posts by Ron Beaufort :)

Share this post


Link to post
Share on other sites
In response to 1) its not a factor of being lazy or anything i just didnt know how to reflect this enter key strike in the plot_scr.txt code. I wasn't sure if this batch file is supposed to place the same inputs such as yes or no into the command prompt for all the files. That wasnt a good example, since im always going to use the same printer ( i just chose that one because it was the first one i saw). My problem is that each of my files has two layouts. One is always model and the other is called something different depending on the drawing. The one that is not model is the one i want to print and is always the default setting for the "enter layout name". Is there a way to select this default value such as enter or spacebar and have it reflect in the .bat code for all the other drawings. I was unsure if it would since the default value is going to change for each drawing.

Share this post


Link to post
Share on other sites
This is what copy from command line history looks like (it can be pasted into script, in fact this is what i do to create them): Command: -plot Detailed plot configuration? [Yes/No] <No>: y Enter a layout name or [?] <Model>: ? Layout(s) in drawing: Layout1 Model Enter a layout name or [?] <Model>: Layout1 Regenerating layout. Regenerating model. Enter an output device name or [?] <Kyocera Mita KM-3035 (KPDL)(Controls)>: HP DeskJet 1120C I use two printers most of the time. for each I created separate scripts (they had to be slightly different since one wants "Tabloid" the other "11x17" etc.). once they work, they never change, only bat file is generated. as said, this can also be permanent if using loop (FOR %%f IN (*.dwg) DO...). the script is used to tell Autocad what to do (same as if you ware typing, nothing but "playback"). if Enter works to make selection, then just make sure script has it (blank new line but make sure you don't overdo it either). i would suggest using proper string (Model, Layout1, whatever...) this is what need to be created once and only once (it will be used for every single page), BAT file is used to initiate printing of every page (at least those listed in it) using those settings stored in script.

Share this post


Link to post
Share on other sites
I believe my problem lies within my network. My autocad lite 2006 access is to a shortcut on my d:\ drive which references to my c:\ drive which has the original aclt.exe file. But wouldnt you know it i cant load it from dos because if i go to its address in cmd i cant type the original files address in and load it for the c:\ drive. And wouldnt you know it dwf viewer is locked up too. Admistrator privelages. I'm assuming that dos will not access shortcuts, almost certain about this before i even tried it. So, does anyone know of another program to view dwg files that is free and will plot exactly as if it were autocad plotting it? Maybe its my code I have all my drawings and my txt's and bat's in the same folder plot these files.txt & plot these files.bat : C:\Program Files\AutoCAD LT 2006\aclt.exe "210151-80-001.dwg" /b plot_pdf.txt C:\Program Files\AutoCAD LT 2006\aclt.exe "210151-80-100.dwg" /b plot_pdf.txt del /q *.bak plot_pdf.txt: Command: filedia Enter new value for FILEDIA <1>: 0 Command: zoom Specify corner of window, enter a scale factor (nX or nXP), or [All/Center/Dynamic/Extents/Previous/Scale/Window/Object] <real time>: extents Command: -plot Detailed plot configuration? [Yes/No] <No>: y Enter a layout name or [?] <Layout1>: Enter an output device name or [?] <HP Color LaserJet 8550 PS>: \\Cusiif03\7129 - HP LaserJet 6P Enter paper size or [?] <Letter>: Enter paper units [Inches/Millimeters] <Inches>: Enter drawing orientation [Portrait/Landscape] <Landscape>: Plot upside down? [Yes/No] <No>: Enter plot area [Display/Extents/Layout/View/Window] <Extents>: Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <Fit>: Enter plot offset (x,y) or [Center] <Center>: Plot with plot styles? [Yes/No] <No>: Enter plot style table name or [?] (enter . for none) <>: . Plot with lineweights? [Yes/No] <Yes>: Scale lineweights with plot scale? [Yes/No] <No>: y Plot paper space first? [Yes/No] <No>: Hide paperspace objects? [Yes/No] <No>: Write the plot to a file [Yes/No] <N>: Save changes to page setup [Yes/No]? <N> Proceed with plot [Yes/No] <Y>: y Command: filedia Enter new value for FILEDIA <0>: 1 Command: quit Any suggestions Edited by kyle

Share this post


Link to post
Share on other sites
things displayed by Acad should be removed or - kept for clarity but commented out by placing semicolon in front of each such line (this way ACAD ignores it). be careful about extra blank lines (Enter keys) because they will be interpreted as extra key strokes try this: filedia ;Enter new value for FILEDIA <1>: 0 zoom ;Specify corner of window, enter a scale factor (nX or nXP), or [All/Center/Dynamic/Extents/Previous/Scale/Window/Object] <real time>: extents -plot ;Detailed plot configuration? [Yes/No] <No>: y ;Enter a layout name or [?] <Layout1>: Layout1 ;Enter an output device name or [?] <HP Color LaserJet 8550 PS>: \\Cusiif03\7129 - HP LaserJet 6P ;Enter paper size or [?] <Letter>: Letter ;Enter paper units [Inches/Millimeters] <Inches>: Inches ;Enter drawing orientation [Portrait/Landscape] <Landscape>: Landscape ;Plot upside down? [Yes/No] <No>: No ;Enter plot area [Display/Extents/Layout/View/Window] <Extents>: Extents ;Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <Fit>: Fit ;Enter plot offset (x,y) or [Center] <Center>: Center ;Plot with plot styles? [Yes/No] <No>: No ;Enter plot style table name or [?] (enter . for none) <>: . ;Plot with lineweights? [Yes/No] <Yes>: Yes ;Scale lineweights with plot scale? [Yes/No] <No>: y ;Plot paper space first? [Yes/No] <No>: No ;Hide paperspace objects? [Yes/No] <No>: No ;Write the plot to a file [Yes/No] <N>: No ;Save changes to page setup [Yes/No]? <N> No ;Proceed with plot [Yes/No] <Y>: y filedia ;Enter new value for FILEDIA <0>: 1 quit

Share this post


Link to post
Share on other sites
Ok in a roundabout effort i copied the files to the d drive and am able to load aclt.exe from dos so i believe that there is something wrong with my code possibly? Could there be an error in the location of the files and the location of the aclt.exe? Do these need to be in the same folder? here is my new code for plot these files.bat : D:\Documents and Settings\bact3bz\Desktop\AutoCAD LT 2006\aclt.exe "210151-80-100.dwg" /b plot_pdf.txt D:\Documents and Settings\bact3bz\Desktop\AutoCAD LT 2006\aclt.exe "210151-80-001.dwg" /b plot_pdf.txt del /q *.bak the first part is where the autocad lite 2006 file is and the "210151-80-100.dwg and the 001.dwg" files are in a different folder D:\Documents and Settings\bact3bz\Desktop\print\80% do i have to reference this path even if these dwg files are in the same folder as the plot these files.bat? It should plot these files when i double click the plot these files.bat if eveything is set up correctly, correct? Sorry for so many questions, you have been very understanding and very helpful!!!!!! Edited by kyle

Share this post


Link to post
Share on other sites
if the BAT and script files are in a same folder as the drawings, you don't need to use absolute path for any of them.

Share this post


Link to post
Share on other sites
Thanks Panic Mode Yeah, my bat files and my txt files are in the same folder as my drawings. However, when i double click the bat file in order to open autocad and the drawings and then plot them the bat file opens a dos window but for less than maybe 2 seconds and then closes and nothing is printed or opened in autocad. I am confused on why it would do this. I tried to just open autocad with the code by making a bat file that all it has in it is the location of the file open autocad code: D:\Documents and Settings\bact3bz\Desktop\AutoCAD LT 2006\aclt.exe But nothing opens so i think i may be doing something wrong from this point and autocad is not open so it cant load the files and then cant plot. Any suggestions on how to solve the problem of getting it to load? If i go into dos and type that d drive string it will load autocad so i know it can load from dos i think im just loading it wrong in the bat file or i have a problem with the location of the drawing or batch files.

Share this post


Link to post
Share on other sites
The application is not likely to be in Documents and Settings folder. That folder is for documents not for apps. If person installing it didn't chage default instal directory, it is most likely to be somewhere under Program Files. to find out exactly, simply go to your Autocad icon (either on desktop or Start, Programs, Autocad Lite etc.), then rightclick on it and choose properties. you will see something like on attached screenshot. Note that on my computer, Autocad is part of mechanical desktop (MDT). in case this is really where it is installed (you are not Mac user by any chance? ;)) another thing you can try is replace D:\Documents and Settings\bact3bz\Desktop\AutoCAD LT 2006\aclt.exe with start "D:\Documents and Settings\bact3bz\Desktop\AutoCAD LT 2006\aclt.exe" (note "start" and application path inside quotas) but imho it is so much cleaner to simply add to PATH your D:\Documents and Settings\bact3bz\Desktop\AutoCAD LT 2006 or whatever it is.

Share this post


Link to post
Share on other sites
I did some searching myself and came up with this: start /b D:\AutoCAD\aclt.exe "210151-80-100.dwg" "plot_pdf.txt" del /q *.bak This doesnt load the command line script into the command line for some reason. But the specified drawing loads up in autocad.

Share this post


Link to post
Share on other sites
parameter /b is in wrong place

Share this post


Link to post
Share on other sites
for the batch file code plot these files.bat: plot these files.bat start D:\autocad\aclt.exe "210151-80-100.dwg" /b "plot_pdf.txt" del /q *.bak AutoCAD starts and then loads the file 210151-80-100.dwg and then an error message shows up in auto cad saying: "plot_pdf.txt" invalid file name the plot_pdf.txt file and the drawing are in the same folder as the plot these files.bat batch file to run this. do i need to have the plot_pdf.txt file saved somewhere else or have it loaded into autocad somehow differently?

Share this post


Link to post
Share on other sites
did you try using path also for this file?

Share this post


Link to post
Share on other sites
Well, I thought about that, but I am just not sure how autocad calls upon this text file imputting the values into the command line prompt. Could you explian how autocad recieves this information from the text file, i am assuming that creating a path like start d:\......plot_pdf.txt would only start notepad with the file and not load it into autocad.

Share this post


Link to post
Share on other sites
don't assume, everything after program name is parameter or parameters for that program. but before this goes too far (isn't it already?) i would suggest to simply add that acad folder to your PATH variable and move on or you will never be done with it. How about Start > Settings > Control Panel > System > Advanced > Environment Variables There are two fields (User and System variables). Under System Variables locate Path, click on it and say Edit. Be carefull to keep existing content as it is (it is quite long on my PC), just on the end of it add one semicolon (separator) followed by D:\autocad\ if that is where your application is installed.

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
Sign in to follow this  
Followers 0