Tuesday 7 February 2012

Creating a Script to Print

Ok so if you want to print off a drawing very quickly why not create a script which will do all the steps for you.

To start off open notepad. Note you need to remember that every space you leave AutoCAD will read so if you have finished a line hit enter to start the next.

First all you need to make sure you are in paper space or on a layout tab, so the first line you need to type TILEMODE 0.

So the script will look somethine like this.

TILEMODE 0
-plot
y

drawing sheet
a1 dwf
dwf6 ePlot

ISO full bleed A1 (594.00 x 841.00 MM)
millimeters
landscape
n
extents
1:1
center
y
giff full size mono.ctb
y
n
n
n

n
y

Please note where I put (giff full size mono.ctb)you need to put the ctb your are going to use.

Now you have put all this into notepad hit save. I have called mine dwf A1.scr, you need to have .scr at the end otherwise it wont work.

Open up AutoCAD if its not already open and type CUI enter. The CUI dialog box will open.
At the bottom left hand side under commands section there will be an icon that will create a new command, hit that and it should start to create a new command.

Give you command a name (i.e. A1 DWF), and a description so if other users will use it they know what it does. 
Ok so for the important bit under Macro, this where AutoCAD will run the command from.
You must always start a command with ^C^C this will escape from any other command before it starts this one.
We then type _script: so I will look for a script, then "the scripts location and name". Its important you have "" at the start and end.

So it should look something like this:

^C^C_script;"//mafp01/mabst1/Design Centre/Support Files/Script/dwf A1.scr"

Now thats done create a image for your icon, then simply add it to a current toolbar/ribbon or create a new one. Unless you have company toolbars/ribbons already i would create one for all your tools.

I hope this was useful, please feel free to leave your feedback.

Thanks.

No comments:

Post a Comment