PDA

View Full Version : Running a Script - Really want to discard all changes to drawing? <N>”


ray.lucas
2006-02-20, 04:33 AM
I've got a feeling that there is a setting that I've over looked, but after some frustration, its best to see if any one here can help.

Running a simple script which opens a drawing, runs a lisp, then closes and saves the file. The problem is on opening the drawing, and closing the default drawing.

The script,

OPEN
CS-M-01.DWG
plot_2D
QUIT
y

The script is dragged into an newly open AutoCAD window with the following variations.

Machine 1 - runs the script without any problems.
Machine 2 – The prompt, "Really want to discard all changes to drawing? <N>" refering to drawing1.dwg

If the script is modified to

OPEN
y
CS-M-01.DWG
plot_2D
QUIT
y

Machine 1 – Attempts to open drawing Y
Machine 2 – runs the script without any problems.

I have two options, one place a zoom extents before the open, then the file is modified and will always ask, “Really want to discard all changes to drawing? <N>” or find out why machine 2 asks this question when machine 1 will not. Option 1 is bad programming, so I would like to see if anyone can help me.

Mike.Perry
2006-02-20, 10:54 AM
Hi

The following threads should give you the information you need to work round this issue...

Closing a drawing (http://forums.augi.com/showthread.php?t=6595)

Unchanged dwg still prompts to save changes (http://forums.augi.com/showthread.php?t=24415)

Initial Drawing on AutoCAD 2005 Startup (http://forums.augi.com/showthread.php?t=17228)

Have a good one, Mike

ccowgill
2006-02-20, 11:23 AM
does machine 2 have some sort of a change in the acad.lsp file. Our office has our acad.lsp file setup to change many system variables at startup as well as create a couple of layers and set a few other options. It always asks us if we want to save changes to our drawings. I would recommend comparing both machines and verify that they start ACAD in the same way.

ray.lucas
2006-02-21, 01:51 AM
First thanks for the replies
Just to cover a bit more of our setup here, we all run the same AutoCAD 2005 with ACADDOC, menus and setup files. The system is strict in that each time AutoCAD is started all menu's are deleted and copied from the network along with setup files and ACADDOC. All lisps, blocks, scripts are access via the network, the user can't modify anything but the way AutoCAD looks.
12 offices Asia/Pacific wide with about 400 users, all running the same system.

After using DBMOD on each of the machines, Machine 1 = 5, and Machine 2 = 1, something was going on, but no idea what. By the way what is 5, not covered in the help

The only file that could be different is the profile, as over time it can be changed or even corrupted, so renamed the profile ran it again and worked. Exported the profile from Machine 2 to Machine 1, Machine 1 still works, so all I can guess is that there is something in the profile that is not exported that has affected the drawing1.dwg file on opening.

Running a new profile on Machine 2 fixed the problem.

This was one machine out of 10 that didn't work, so for me its a fix, but still leaves the question why would a profile affect a drawing this way?

kennet.sjoberg
2006-02-21, 08:15 AM
. . . By the way what is 5, not covered in the help. . .

Machine 1 => Object database modified and Database variable modified ( 1+ 4 )
Machine 2 => Object database modified

( from the help )
1 Object database modified
4 Database variable modified
8 Window modified
16 View modified

AutoCAD resets the DBMOD value to 0 when you save the drawing.

: ) Happy Computing !

kennet