Select to view content in your preferred language

Removing layer before map closes or preventing map save

898
3
05-27-2011 12:57 PM
JaneOnorati
Regular Contributor
I have code that adds images to a map as needed because I can't have them all in the map at the same time without memory issues.  The user will only need one per session anyway based on the site they are visiting. 

The problem is figuring out an event to use to remove the added image before closing the map, or just prevent the map from being saved.  I have not had any luck finding a way to do either.  I tried the OnClose event of the map, but the save dialog comes up before that.  I have not tried the OnSave event, but I'm guessing that will be too late also.  Ideas?
Tags (3)
0 Kudos
3 Replies
RolfBroch
Frequent Contributor
Application.Properties("SavePrompt") = False

should take care of that.

Rolf
0 Kudos
JaneOnorati
Regular Contributor
Rolf,

I did find that and am using it.  However, I may have run into a bug in ArcPad 10.0 R2.  I saved the map by clicking on the save button before exiting, and now every time I exit ArcPad I get an error message.  Other than that, it works fine.  The only thing I can think of to fix this is to reinstall ArcPad, try it again and see if the problem reoccurs.

-Jane
0 Kudos
JaneOnorati
Regular Contributor
Well I'm not getting the error message today.  A restart of my PC must have fixed it.  Hopefully the problem does not happen again if a user decides to save the map in ArcPad.
0 Kudos