Hurricane Tutorials are now online!
FAQ Index

How do I batch PLOT? (A2K+)


In AutoCAD 2K (and up), the PLOT command has gone under some major rework by AutoDesk, and they have made it a lot harder to script a simple plot, as many of the options are now saved within the drawing itself.

Basically, the logic is the same for the PLOT command as any other AutoCAD commands...

(Actually, you can step yourself through the commands yourself to develop the script rather quickly): by typing

-PLOT

(with the dash in front) at the AutoCAD command line. This will give you the command-line version of the PLOT command (without the dialog box). The prompts provided by AutoCAD are what you will need to respond to with your script. So yes, you are on the right track. (See Also Which AutoCAD commands have command-line functionality?)

Here is the AutoCAD "Text" window (F2), by just typing everything in...

Command: -PLOT
Detailed plot configuration? [Yes/No] : Y
Enter a layout name or [?] : MODEL
Enter an output device name or [?] : pdf-exchange 2.pc3
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/Limits/View/Window] : DISPLAY
Enter plot scale (Plotted Inches=Drawing Units) or [Fit] : FIT
Enter plot offset (x,y) or [Center] <0.00,0.00>: 0,0
Plot with plot styles? [Yes/No] : NO
Enter plot style table name or [?] (enter . for none) <>: .
Plot with lineweights? [Yes/No] : YES
Remove hidden lines? [Yes/No] : YES
Write the plot to a file [Yes/No] : N
Save changes to model tab [Yes/No]? N
Proceed with plot [Yes/No] : Y

(The above has been "cleaned-up" a bit, removing some extraneous carriage returns)

Once you have it in this format, take it an cut/paste it in the "Command Capture Utility"

Please See How can I record my commands in AutoCAD? (as a script)

(just press the "Capture" button on the far right of Hurricane (about half way down), and press the "Get Scrollback text from Clipboard" button, which should then make it look like the attached file(s). Press the "Capture AutoCAD Commands" button, and it basically strips out the "question" portion of the AutoCAD text window, and outputs the script in the window on the right.
(Sometimes some minor editing is required due to AutoCAD adding extra "Carriage Returns" here and there...)

So here is the output for the above... (of course you could change any of your answers above to suit)

;BEGIN SCRIPT
-PLOT
Y
MODEL
PDF-EXCHANGE 2.PC3
LETTER
INCHES
LANDSCAPE
NO
DISPLAY
FIT
0,0
NO
.
YES
YES
N
Y
;END SCRIPT

You could easily add remarks to this script to identify what all the different lines mean.
For instance:

;BEGIN SCRIPT
-PLOT
Y
MODEL
PDF-EXCHANGE 2.PC3
LETTER
INCHES
;Orientation (Portrait/Landscape)?
LANDSCAPE
;Plot upside down (Yes/No)?
NO
;Enter Plot Area (Display/Extents/Limits/View/Window)
DISPLAY
FIT
0,0
NO
.
;Plot with Lineweights? (Yes/No)
YES
;Remove Hidden Lines? (Yes/No)
YES
N
Y
;END SCRIPT


Previous Back to Hurricane for AutoCAD - FAQ Next