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
(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...
Detailed plot configuration? [Yes/No]
Enter a layout name or [?]
Enter an output device name or [?]
: pdf-exchange 2.pc3
Enter paper size or [?]
Enter paper units [Inches/Millimeters]
Enter drawing orientation [Portrait/Landscape]
Plot upside down? [Yes/No]
Enter plot area [Display/Extents/Limits/View/Window]
Enter plot scale (Plotted Inches=Drawing Units) or [Fit]
Enter plot offset (x,y) or [Center] <0.00,0.00>: 0,0
Plot with plot styles? [Yes/No]
Enter plot style table name or [?] (enter . for none) <>: .
Plot with lineweights? [Yes/No]
Remove hidden lines? [Yes/No]
Write the plot to a file [Yes/No]
Save changes to model tab [Yes/No]?
Proceed with plot [Yes/No]
(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)
You could easily add remarks to this script to identify what all the different lines mean.
;Plot upside down (Yes/No)?
;Enter Plot Area (Display/Extents/Limits/View/Window)
;Plot with Lineweights? (Yes/No)
;Remove Hidden Lines? (Yes/No)
|Previous||Back to Hurricane for AutoCAD - FAQ||Next|