Autocad creating a bak file ater a quit command in a script.

Autocad creating a bak file ater a quit command in a script.

Anonymous
Not applicable
1,243 Views
5 Replies
Message 1 of 6

Autocad creating a bak file ater a quit command in a script.

Anonymous
Not applicable

Hello all,

 

I have a small but annoying problem. Every time when i use a script file to plot a batch of drawings, AutoCad saves the last file even when i use the quit command. As soon as i plot a drawing in AutoCad this problem doesn't occur. At the bottom i have listed a portion of the script file that is generated to print to a pdf file, the same happens when i print to a printer for a hard copy. I don't get why AutoCad saves the file and creates a bak file when i tell it to quit.

 

With kind regards,

 

Johnny

 

SDI
1
open
"049368_0000_001.dwg"
plot
y
model
dwg to pdf
iso expand a4 (210.00 x 297.00 mm)
m
l
no
e
f
center
y
monochrome-pdf.ctb
n
a

n
y
filedia
1
SDI
0
quit
no

 

0 Likes
Accepted solutions (1)
1,244 Views
5 Replies
Replies (5)
Message 2 of 6

pendean
Community Legend
Community Legend
May I ask why you are not using paperspace layouts, SSM for sets of drawings, and PUBLISH command for this most basic need? We are all old-timers here, been around since the DOS days of AutoCAD if that helps.
0 Likes
Message 3 of 6

Anonymous
Not applicable

Dean,

 

Like you already mentioned, we are all old timers.. 🙂 (been using Autocad since version 2.5.......)

 

The reason why i'm not using the paper space (layouts) is that we use Autocad for electrical schematics and in that line of work we don't see the benefits of using layouts. We also have to deal witch clients that have their electrical drawings in model space. Another reason we use the scripts is because we use a plot script generator. The only thing we have to do is select the drawings we need to have plotted/printed and the script is automatically created. So there is no point in changing the way we work. Fact remains that it is very strange that as soon as you quit a drawing manually the file isn't saved, and no bak file is created, but as soon as i do  the same in a script the file gets saved, a bak file is created and the file date is altered. One of my clients has a big problem with that, cause every time they are asking what changed in the file because all they look at is the file date. So my question is still, why does the file get saved, and is there anything i can do to change it...... 

0 Likes
Message 4 of 6

steven-g
Mentor
Mentor

I imagine the script is quite long due to the number of printed layouts, does it have the same effect with just a few layouts? and if yes could you then post the full version of the script and a complete copy of the command line history from the start of the script being run, it might give a clue.

0 Likes
Message 5 of 6

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

I see that you are visiting as a new member to the AutoCAD LT forum. Welcome to the Autodesk Community!

 

When I run your script, I see it error out right after selecting the CTB file.

 

Perhaps on the BAK issue you could temporarily change your ISAVEBAK variable.  Is that an option?

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 6 of 6

Anonymous
Not applicable
Accepted solution

Dean, Steven, John,

 

Thanks for the input (especially Stevens). I finally figured out what the problem is.

When I started writing the original script I went by the dialog boxes from Autocad. Here lays the problem. The dialog in script files is different ten when you type in the commands manually. As soon as you type quit manually Autocad asks "Save changes to (FILENAME.DWG) So i will answer with "NO"

 

The same "NO" I use in the script file but the question is different there. The question that Autocad is asking is the following "Really want to discard all changes to drawing? <No> !

 

That results in that the file is saved and a bak file is created. 

 

Thanks guys for the input, Steven thx for opening my eyes. I compared the script with the dialog in Autocad and that made me see the error. (still kinda weird that Autocad has two different dialogs for the same command.

 

thx guys....