Member Login

Username:   

Password:    

ESRI: Partner Network - Silver
for more information call +44 (20) 7031 8172 or click here to Contact Us

Blogs

Tip 9: Relative Paths

Date: 5/5/2010

When you start up a new ArcMap document, you almost immediately and probably unknowingly lock yourself into using either relative or full folder paths:

  1. A relative folder path specifies the location of files brought into the project in relation to where you have saved your ArcMap document for the project. 
  2. A full folder path specifies the location of files brought into the project using the complete path to the data, including the drive information.

 

So the first thing to do is to make sure that you have created a folder structure for your data and you have a folder named something like “mxd” to store your ArcMap documents in.

An example simple project folder structure might be:

  • C:\project\mxd\my_project.mxd
  • C:\project\geology\geology.fgdb\lower_cretaceous
  • C:\project\layers\geology\Lower Cretaceous Play.lyr

 

The relative path from the mxd to the dataset is ..\geology\geology.fgdb\lower_cretaceous and this works in a similar fashion for other data sources. The “..” means go up one folder level from the mxd file and read the rest of the file reference from there.

You should be aware though that relative paths work only across the same drive, so if you are using files stored on a different drive to your ArcMap document they will be specified as full paths even if you have set your project to relative paths.

A full path is what most people are used to. In the example project folder structure above the full path reference to the data is C:\project\geology\geology.fgdb\lower_cretaceous

To set the map document to use relative paths you should select the following option:

  • File > Document Properties...Data Source Options…

 

ArcMap Document Properties Dialog

Clicking the Data Source Options button brings up the dialog allowing you to choose full or relative path names, and also to set the default for all future projects.

 ArcMap Data Source Options

Which to Use?

I think there is one simple question that you need to answer (ok nothing is ever that simple – but very often if the answer is definitive, then you know which method to use):

Question: is it likely that during this project or anytime in the immediate future I am going to have to move my mxd file(s) to a new location without moving the rest of the data?

  • Answer – Yes: You are probably better off using full path names, because on moving the MXDs you will be chaning the relative position of the MXD to the datafiles.
  • Answer – No: If you are likely to move only the entire project folder structure (including MXDs) then relative path names will save you heaps of work!

 

Posted by Chris Skelly, Training Manager, Exprodat.

Comments Comments (0)


Add Comment
Please Note fields marked with an asterisk * are required
 
 
 
 
   
  Top      Back

RSS FeedsRSS Feeds
Follow Exprodat online:
You TubeTwitterLinked InFacebook