PDA

View Full Version : Close ACAD dwg w/o save?



JuergenL
15th Dec 2004, 07:51 pm
How do I close an ACAD drawing without saving it?

We are plotting many read-only drawings which we open via Windows Explorer. We have a button made which sets all print parameters, plots and closes. I can then look at and print the next drawing.

Unfortunately, since the print parameters were changed ACAD asks, for each drawing, if I want to save. Is there any way around it?

Along the same line is there a way to open all of them as read-only without being asked for each individually?

Dommy2Hotty
15th Dec 2004, 09:51 pm
Batch and script files....

EDIT: Or without the batch...you can turn your button into a call to a script file, and add the following to the end...

Quit
Y
<-Make sure you hit enter after the Y to get a blank line at the end

EDIT 2: And to quell any further questions, take the code you put in the button, paste it into a text file and save it with a .SCR extenstion. Each user input goes on it's own line WITHOUT semicolons. That's how you make a script file...As for the QUIT and Y at the end, a script file's QUIT command reverts to the old QUIT command where it asks "Discard changes?" instead of "Save changes"...that's why in a script file you put Yes, because that means you want to get rid of any changes, i.e. your plotting parameters...

Here is an example script file for plotting I use (for plot files):

&#40;setq destpath &#40;getvar "dwgprefix"&#41;&#41;
&#40;setq dname &#40;getvar "dwgname"&#41;&#41;
&#40;setq dname &#40;substr dname 1 &#40;- &#40;strlen dname&#41; 4&#41;&#41;&#41;
&#40;setq d &#40;rtos &#40;getvar "CDATE"&#41; 2 6&#41;&#41;
&#40;setq yr &#40;substr d 3 2&#41;&#41;
&#40;setq mo &#40;substr d 5 2&#41;&#41;
&#40;setq day &#40;substr d 7 2&#41;&#41;
&#40;setq today &#40;strcat mo "-" day "-" yr&#41;&#41;
&#40;setq folder &#40;strcat destpath "PlotFiles-" today "\\"&#41;&#41;
&#40;setq savename &#40;strcat folder dname&#41;&#41;
-PLOT
Yes
Model
Oce 9600.pc3
ARCH D &#40;24.00 x 36.00 Inches&#41;
Inches
Landscape
Yes
Window
0,0
144',96'
1=48
Center
Yes
Line Widths 430.ctb
Yes
As
Yes
!savename
No
Yes
Quit
y



EDIT 3: Button to call script


^C^C^C_script;Plot-8x11-Portfolio;

If the script file is NOT in your AutoCAD search path (as defined under the Files tab of the Options dialog box), then you must specify the path to the file. Use / inside the file path because AutoCAD interprets \ as pause and that would defeat the purpose (and nullify the path).

^C^C^C_script;"Z&#58;/Scripts/Plot-8x11-Portfolio.scr";

JuergenL
16th Dec 2004, 04:09 pm
Thanks for your answer but this is too deep for me. I will have to pass it on to our guru.

To clarify, Quit means quitting ACAD?
We actually like to look at each drawing before we print to make sure it is the right one. That means we like to CLOSE the active sheet only, and then look at the next file before printing it. We print only 20 or so at a time so this works for us.

hyposmurf
16th Dec 2004, 09:45 pm
You really should try giving it a go,scripts arent that hard to use.Have you looked for a the batch plot utility in the help files?