tut: Portable MXD

Using Relative Paths to Create a Portable .mxd

Steps for distributing ArcGIS maps and data

In order for you to be able to share your ArcMap map (.mxd) with other GIS users (and/or your instructor) you will need to provide them with not only the .mxd but also the data used in the map. In addition, the .mxd must be able to locate the data in order for everything to display properly. To insure that the .mxd still works once it is moved you will need to set up a PORTABLE .mxd. This requires two things: proper data management and the use of Relative Paths for the .mxd properties.

1. Data management

For sharing of data and maps, you will want everything stored in a single folder (with optional sub-folders inside). In this folder you should have all of your GIS data as well as your .mxd file(s). As always with GIS related matters, creating descriptive file names and file and folder names without spaces or non-alphanumeric characters is advised.

So for example, you might create a GIS_proj folder in C:/temp. Within this main GIS_proj folder you might have a series of sub-folders (e.g., /data, /maps, /exports, /documents, /mxds, etc.) sorting your various files into logical categories. Use ArcCatalog for copying and moving GIS data (not Windows Explorer).

Note that all of your data (and your .mxd files) could be in a single data folder. However, the use of sub-folders is strongly recommended. You may even wish to have sub-folders within your sub-folders. For example, within your /data folder you might have multiple data folders (/data/data_archives, /data/data_city, /data/data_gps, etc).

2. Create Your Map using RELATIVE PATHS

Having logically organized your data in your project folder, you can build your .mxd(s), which will also be saved in the GIS_proj folder (optionally in your /mxds or /maps sub-folder). If you have a pre-existing map project you can copy it to your GIS_proj folder. In this case you will need to manually re-set each data layer (from the Source tab of the Layer Properties) to make sure it is using the data in your GIS_proj folder (and not another copy of the same data on your U:/ drive or the J:/ drive or somewhere else...). 

To verify that all of the data in your .mxd is being stored in you project folder click the Source tab at the top of the Table of Contents in ArcMap.

Once you have a working .mxd (using only data from your project folder) you will need to set it's Document Properties to use Relative Paths. This is critical – otherwise your .mxd will only work when your folder is stored in the C:/temp folder of a computer and will not be truly portable. To set Relative Paths for an .mxd:

  • In ArcMap, choose Map Document Properties... from the File menu
  • Check the check box beside Store relative path names to data sources
  • Click OK
  • Save your .mxd

3. Test Your Map

To test the portability of your map project, copy your entire GIS_proj folder (including the data and the .mxd(s) using relative paths) to your U:/ drive or an external / thumb drive. 

Open your .mxd (from it's new location)

Once you have moved your folder to a new location open the .mxd and check the sources (using the Source tab above the Table of Contents and/or the Source tab in the individual Layer Properties). All of the data should be coming from the new location (i.e., from your U:/ drive or external drive or wherever you moved your folder). And of course, there should be no red !'s.

An even better test is to have someone else try your .mxd from their computer using their login. The goal of these tests is to make sure that your .mxd really is using relative paths and that all the data was properly copied in the project folder with the .mxd.

You (or someone else) should be able open your .mxd from a new computer or the U:/ drive or from the external drive, or from wherever your GIS_proj folder is. A properly designed project folder with an .mxd using Relative Paths should be able to be opened from any location.

4 Share Your Map Project(s) - i.e., .mxd files and data

Having verified that all of your data is where it should be (in the GIS_proj folder) and that all of your .mxd files are using relative paths and are using the data in the GIS_proj folder, you can share you map project with others by giving them the entire GIS_proj folder (on a CD, etc.).