Can LISP prevent panning/zooming from triggering the file changed indicator?

Can LISP prevent panning/zooming from triggering the file changed indicator?

Anonymous
Not applicable
869 Views
7 Replies
Message 1 of 8

Can LISP prevent panning/zooming from triggering the file changed indicator?

Anonymous
Not applicable

I have never needed to work with LISP before, but it has been suggested to me that LISP may be able to prevent panning and zooming from triggering the indicator that the file has been changed.

 

Is this possible?  If so, I would appreciate any guidance on how this might be done.

0 Likes
870 Views
7 Replies
Replies (7)
Message 2 of 8

ronjonp
Mentor
Mentor

Try something like this:

(acad-push-dbmod)
(vla-ZoomExtents (vlax-get-acad-object))
(acad-pop-dbmod)
0 Likes
Message 3 of 8

cadffm
Consultant
Consultant

The answer is No, BUT.. you can create a program that can reset the information if there is not a bit1 or 4 change.

 

 

 

 

Sebastian

0 Likes
Message 4 of 8

Anonymous
Not applicable
@cadffm wrote:

The answer is No, BUT.. you can create a program that can reset the information if there is not a bit1 or 4 change.

Is that what rperez's proposed solution does?

0 Likes
Message 5 of 8

ronjonp
Mentor
Mentor

Give it a try. Open a new drawing, invoke (acad-push-dbmod) make changes to the drawing, pan etc then invoke (acad-pop-dbmod). Close the drawing and it shouldn't prompt to save changes.

0 Likes
Message 6 of 8

Anonymous
Not applicable

@ronjonp wrote:

Give it a try. Open a new drawing, invoke (acad-push-dbmod) make changes to the drawing, pan etc then invoke (acad-pop-dbmod). Close the drawing and it shouldn't prompt to save changes.


I now have a better understanding of what your proposed code does, but I'm afraid it's not what I'm looking for.

 

What I want is the ability to have the file change indicator accurately reflect whether any *actual* changes have been made, but to not give a false positive if the only things that have been done are panning and zooming.

0 Likes
Message 7 of 8

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:
What I want is the ability to have the file change indicator accurately reflect whether any *actual* changes have been made, but to not give a false positive if the only things that have been done are panning and zooming

This has been hashed over extensively before.  The quick answer is No, but if you Search for Pan & Zoom & DBMOD and related terms, here and perhaps also in the main AutoCAD Forum, you'll find lengthy threads about it, which may give you some ideas, and spare a lot of people responding on this thread with things that have already been suggested elsewhere.

Kent Cooper, AIA
0 Likes
Message 8 of 8

jtoverka
Advocate
Advocate

It can be done. However, this problem is more difficult than it should be. Here is how it cannot be done:

- Cannot monitor mouse scrolling (via reactor)

- Cannot monitor DBMOD system variable (via reactor)

- I've tried finding a hack within views, viewports and usc collections as well to no avail.

 

Here is how it can be done theoretically, (untested)

-grread monitors all keyboard inputs (although this may create more problems than it solves)

- Monitor changes within the drawing using reactors to set a variable to true. Upon closing the document, use a reactor to see if the variable is true, if it is not true, close without saving.
(note: This option can be dangerous as it requires you to explicitly monitor everything else to rule out a pan or zoom via mouse movements, a potential source of bugs)

 

Lastly, if anyone could find a way to create a reactor for the center, width, and height property of the drawing view as shown in the properties window, then that could be a potential solution.

 

Honestly, I would not invest the time into solving this nuisance. Even if you find something that works, there would be a strong possibility of a bug that will cause data loss (not asking to save when there is a valid change). Eliminating a nuisance in exchange for potential data loss is not worth it. 

0 Likes