Jump to content

AutoCAD Previous Plot


sabrefreak

Recommended Posts

Is there any way to set "Previous Plot" as the default in CAD? I have several users (CAD 2008, 2008LT, 2007LT) and they all tend to print to just one printer most of the time so it's a real pain to keep clicking "previous plot" when it could be set there by default?

 

Appreciate any help.

Link to comment
Share on other sites

  • 1 year later...

Just a little late, but hopefully this will pop up for others who are trying to figure out how to do the same thing (like me!)

 

Here's what worked for me (YMMV):

 

Open up your CUI (Customize User Interface) by selecting 'Tools ->Customize->Interface...'

Create two new macro buttons, one for "Plot Previous Style" and one for "Preview Previous Style".

(The second toolbar button isn't strictly needed, unless you want to quick-check that your 'previous plot' settings are really going to work on the current layout.)

Note1: I just duplicated the existing 'Plot' and 'Plot Preview' buttons, then renamed them and edited the graphics a little so I could tell them apart on the toolbar. Save button graphics to new files!

Note2: After you are done editing your buttons and macros, remember to 'drag' them from the CUI interface to the toolbar location you want to put them, so you can use them!

 

Enter this macro string for your new "Plot Previous Style" button (al lthe same, no extra spaces, etc.):

^C^C-plot;n;;previous plot;;n;y;y;

 

This macro basically enters the command line sequence to plot the current layout using previous plot settings, and saves the plot settings to the current layout. If you want to do the same thing but don't want to save your 'previous plot' settings to the layout, use this instead:

^C^C-plot;n;;previous plot;;n;n;y;

 

Enter this string for your new "Preview Previous Style" button (optional, as mentioned above, but I have been finding it handy):

^C^C-plot;n;;previous plot;;;yes;no;preview

 

As you can see, it looks very similar to the 'Plot Previous Style' macro string, however this time we're 'pretending' to plot in order to apply and save the 'previous plot' settings to the layout, then calling the 'preview' command from the command line. Unfortunately, this time you really do have to save the plot settings to the current layout, because if you don't, the follow up 'preview' command will just use whatever plot settings are saved with the file, not your 'previous plot' settings.

 

 

 

Hope this is of some use to others who are as frustrated by AutoCAD's archaic plot gymnastics as I was!

CC

 

Acknowledgments:

Thanks to articad in the autodesk forum: http://forums.autodesk.com/t5/Visual-Basic-Customization/Is-it-possable-to-plot-previous-using-VBA/m-p/2623659

and thanks to uddfl and JeepMaster in this forum: http://www.cadtutor.net/forum/showthread.php?33027-Print-Preview-with-quot-Previous-Plot-quot-Page-Setup

even though your examples were for lisp (not supported by ACad LT, as far as I can tell), they gave me the hints I needed to figure out the macros.

 

Sorry, missed an acknowledgment:

 

Posts by Eddie and keepviper13 on the autocadeverything forum were also quite useful in figuring out how to do this:

[noparse]http://www.autocadeverything.com/help/showthread.php?1789-Pint-macro-button&p=7490[/noparse]

 

thx,

cc

Edited by CaptainCarrot
combine posts - remove extra text in the middle
Link to comment
Share on other sites

Is there any way to set "Previous Plot" as the default in CAD? I have several users (CAD 2008, 2008LT, 2007LT) and they all tend to print to just one printer most of the time so it's a real pain to keep clicking "previous plot" when it could be set there by default?

 

Appreciate any help.

 

Make sure "Save Changes to Layout" is checked in the plot dialog before pressing OK. This saves the page setup as the default.

Link to comment
Share on other sites

Another (quicker) way-

 

I have set up toolbar buttons to send different sizes of plot to the most used plotter with just one click.

 

e.g.

^C^C-plot;y;;DJ430MECH;Oversize: ISO A2 (landscape);m;l;;e;f;c;y;BNG.ctb;y;;;;;y;y

 

Sends an A2 plot to our DesignJet 430 with one click of the button.

Note- the command syntax there is for 2000, 2002, 2004, your version may have a different syntax.

To check the order of commands in your version type in -plot and make a note of the command line prompts you get.

The paper size for your plotter will aslo probably have a different name.

Link to comment
Share on other sites

If you always (or almost always plot to the same printer with the same settings, isn't it easier to (like RK says) have those settings set to your Layout - for instance in your template?

Link to comment
Share on other sites

Thanks nukecad, I do like that dedicated plotter/size macro idea! That way it doesn't matter what goofy printer the person who created the file used last, it should always send it in the same way to the same plotter for me.

 

Unfortunately, I mostly don't actually generate DWG's, just review, print and some minor markup, so saving the plot settings to my 'template' layout isn't so useful for a quick print (but thanks for the suggestion, Tiger!) Also, thanks to the wide variety of drawing styles I deal with, simply plotting to extents may or may not produce a usable print. If there were some way to force a trigger for user input on the 'Window' selection in the middle of that macro, I would be a very happy camper...hold on a tick...

 

Heyy, here we go!

^C^C-plot;y;;CutePDF Writer;11 x 17;m;l;n;w;\\;f;c;y;monochrome.ctb;y;n;n;n;n;y;y

 

This button macro automagically plots to the pdf printer at our preferred drawing size, and the two slashes after the 'w' (for 'Window' instead of 'Extents') force the macro to pause for two user inputs (selecting the two corners of the plot window). There's no real obvious prompt to indicate that the user needs to select the print window before proceeding, but for my own use, this is stellar!

 

Thanks for pushing the envelope and prompting me to dig deeper into this whole macro business, nukecad! This button should save me much in time and frustration!

 

Props also to Google Books and the book "Mastering AutoCAD 2008 and AutoCAD LT 2008" By George Omura, for their succinct description of using the backslash for Pausing for User Input (Page 801).

Edited by CaptainCarrot
Add acknowledgement
Link to comment
Share on other sites

Ok then lets take this one step further.

 

The above macro is ok if your plotters are connected as LOCAL plotters, or if you are using a PDF writer etc. But if you have NETWORKED plotters you wont get a macro to recognise the pathname to the plotter.

 

In this case you need to call a script. (Dont panic - its easy enough).

 

First you need the script,

As an example for A2 again, in notepad create a file like the following-

 

-plot

y

 

\\Printserver1\DJ430Mech

Oversize: ISO A2

m

l

n

e

f

c

y

BNG.ctb

y

n

n

n

n

y

y

 

 

Save this as A2mech.scr in your Autocad 'Support' folder.

 

(You can find a list of the paths for your networked plotters by using the -plot command and entering ? when it asks for the plotter name).

 

The observant will notice that that is the same as the macro but with the inputs on new lines instead of being seperated by a ;.

 

Now you need a macro to put on the button and call the script-

 

^C^C_scr A2mech.scr

 

You have done it! One click on the button launches the script and sends the plot for you.

Link to comment
Share on other sites

Excellent! I hadn't even realized that would be an issue but of course it would be...

 

It seems to works perfectly except for one minor detail: it appears to 'break' the script processing once it hits the 'pause for user input' backslashes. I.e., all the steps up to the dual backslashes are entered in the command line automatically, and it pauses for me to select my print window correctly, but the remaining steps after I select the print window are waiting for manual input in the command line. I can just hit 'Enter' a bunch of times, and it'll still print, but do you know how to tell the script to resume after the user input interruption, by any chance?

 

Thanks again!

CC

 

My script, for reference:

-plot

y

 

\\printserver\networkprinter

11x17

m

l

n

w

\\

f

c

y

monochrome.ctb

y

n

n

n

n

y

y

Link to comment
Share on other sites

Found a bug in the CutePDF printer button script I posted earlier:

 

Old Script:

^C^C-plot;y;;CutePDF Writer;11 x 17;m;l;n;w;\\;f;c;y;monochrome.ctb;y;n;n;n;n;y;y

 

New Script:

^C^C-plot;y;;CutePDF Writer;11 x 17;m;l;n;w;\\f;c;y;monochrome.ctb;y;n;n;n;n;y;y

 

(note: no semicolon after the two backslashes)

 

I was finding that with the original script, I kept losing the 'fit' command for the plot scale after printing more than one drawing with the button/macro. This correction seems to fix that, in case anyone finds this macro useful.

 

thx,

cc

Link to comment
Share on other sites

do you know how to tell the script to resume after the user input interruption, by any chance?

 

:lol:.....you answered your own question....the command is "resume".

Link to comment
Share on other sites

Thanks for the hint, Cat!

 

Upon further digging, though, it looks like using scripting to print to a network printer isn't going to work for me. Apparently you simply can't pause for user input in a script at all (see Customization Corner at http://www.augi.com/publications/hotnews.asp?page=381) At first glance it had looked like my script was working, since it ran up to the point where I wanted to pause to select the plot window, but apparently it was just breaking on the double backslashes and 'allowing' me to enter the rest of the commands manually.

 

I can, and probably will set this up as an 'Extents' network printer macro, but unfortunately that will probably only be useful for about 20% of the drawings I work with. Still, it's better than nothing! And I can always print to PDF, then to my network printer from there.

 

Thanks everyone for your helpful comments and suggestions!

CC

Link to comment
Share on other sites

  • 1 month later...

Yes you cant have user input in a script.

 

You could window to the section you want to plot before calling the script and then use Display instead of Extents in the script.

Won't give quite the same result as a plot Window but may be near enough?

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...