Where are the preferences stored?

19 views
Skip to first unread message

Duncan Hornby

unread,
Oct 24, 2017, 6:27:00 PM10/24/17
to AGWA Support
Hi,

I have been tasked to look into AGWA and how it can be rolled out at the University I am working at as part of an undergraduate course. 

It's a fairly easy install with the AddIn and that zip file for creating the folder structure with the exe files in them. So far so good, the next step is to set the preferences, the three folder locations, that too is easy. But this is where my question comes, I have been unable to find out in the Help file where those preference settings are stored. 

Are they stored in the Window registry or persisted within the MXD or written to some other well know folder location?  

I need to understand where the preference settings are stored as with just about all University networks the student has to work on Work stations that purge themselves.  I hope someone from the AGWA team can answer this and may I suggest that this information is added the Help file for other developers.

Thanks. 

Shea

unread,
Oct 25, 2017, 2:55:21 PM10/25/17
to AGWA Support
Hi Duncan,
The Home, Temp, and Workspace locations saved in the AGWA Preferences are stored in the XML file associated with MXD map document (it is in the same location with the same name as the map document with the addition of a .xml extension). This is why the map document must be saved before AGWA allows you to save your preferences, because the XML file can't be created until the map document is saved. If you use Windows Explorer to copy, move, rename, or delete a map document, the same will not be done to the associated XML document because Windows doesn't recognize the connection between the .mxd document and the .mxd.xml file. Consequently, the saved preferences will be lost in the file that is copied, moved, or renamed. However, If you do any of these operations using ArcCatalog or the Catalog window in ArcMap then the saved preferences will persist in the copied, moved, or renamed map document. Also note that because of this, the Home, Temp, and Workspace preferences must be set for each map document used with AGWA.

Thanks for your suggestion to add this information to the documentation. I will make sure it's there next time the documentation is updated.

Shea

Duncan Hornby

unread,
Oct 25, 2017, 5:53:12 PM10/25/17
to AGWA Support
Shea,

OK thanks, I had assumed that xml file was just the standard metadata file, so I have one other mini question! Can I edit the XML so that the paths that it is storing are recording a relative pathway something similar to: "..\Poole\MXD\mymap.mxd". I am think that if I can do that I can package up the entire tool, the standard AGWA folders and a project with it's data into a zip file. The student then only needs to unzip it all, register the AddIn and then go an open the mxd. As the XML file will already exist it will hold the pathways in a relative way.   So the student could essentially unzip the folder to any location on the c:\ drive.

Thanks for the help.

Duncan

Shea

unread,
Oct 26, 2017, 8:08:04 PM10/26/17
to AGWA Support
Duncan,
We did not design support for resolving a relative path from those saved preferences, so I was somewhat surprised to see that this does appear to work. I have not tested it exhaustively, but it did locate the AGWA Home directory successfully when I changed the path stored in the XML file from "E:\AGWA\" to "..\..\..\" and had the MXD saved in "E:\AGWA\workspace\tutorials\tutorial_SanPedro\". I also tested the Default Workspace location with a new delineation and it successfully delineated a watershed and saved the geodatabase in the location I expected given the relative path I gave it.

If you have any trouble with it, let me know where and I can take a look and see about fixing it.

Shea 

Duncan Hornby

unread,
Oct 28, 2017, 8:55:37 AM10/28/17
to AGWA Support
OK that is excellent news and certainly helps with distributing the tool in the University environment. If I come across any problems I will feed them back to you. Thanks for your help.
Reply all
Reply to author
Forward
0 new messages