You are on page 1of 3

Technical Articles > ArcGIS Desktop > Map Authoring and Visualization > Labeling

Knowledge Base - Technical Articles

HowTo: Create hyperlinks with relative pathnames


Article 20626
ID:
Software: ArcGIS - ArcEditor 8.1, 8.1.2 ArcGIS - ArcInfo 8.0.2, 8.1, 8.1.2 ArcGIS -
ArcView 8.1, 8.1.2
Platforms: Windows NT 4.0, 2000

Summary
Sometimes you may want to give a map that contains hyperlinks to someone who does not have
access to your network resources. For example, when you want to distribute a CD of data and maps.

Just as you can save the map with relative pathnames to the data, you can also specify hyperlinks
that refer to a location relative to the map.

To specify a path through a folder immediately below the maps location in the file system, start the
path with the folder name. Do not use a \ or drive letter prefix.

To specify a path to a document in a sibling folder, start the path with ..\ and the folder name. For
example, ..\graphics, where the file is in graphics and the map is in maps, and both folders are
in another folder.

This method of specifying relative paths works for dynamic hyperlinks and field-based hyperlinks.

Procedure
There are two methods for applying relative paths for field-based hyperlinks. Only the second works
for dynamic hyperlinks.

Store the name of the linked documents in the table; for example, point_of_interest1.jpg.
Then, set the Hyperlink base in the Map Properties dialog box to point to the folder where the
document is stored; for example, links\graphics or ..\graphics.
This works best when all the linked documents are stored in one location, and makes it easier
to update the location if it changes. Specifying a hyperlink base path has no effect on dynamic
hyperlinks.

1. Create a text field in the table of the features from where you are hyperlinking to store the
hyperlinked filenames.

2. Add the hyperlinked filenames to the table.

3. Right-click the layer in the table of contents and click Properties.


4. Click the Display tab.

5. Check the box to support hyperlinks and click the dropdown arrow to select the hyperlink
field. Click OK.

6. Click File and click Map Properties.

7. Click the Hyperlink base text box and type the path to the hyperlinked documents using the
path naming conventions mentioned above.

Follow the path naming conventions mentioned above to store the path and name of the
document in the attribute field of the feature class or as dynamic hyperlinks; for example,
..\links\fieldnotes.txt or links\point_of_interest1.jpg. This allows more flexibility in organizing
linked documents in different locations.

1. Create a text field in the table of the features from where you are hyperlinking to store the
hyperlinked file paths and names.

2. Add the hyperlinked file paths and names to the table.

3. Right-click the layer in the table of contents and click Properties.

4. Click the Display tab.

5. Check the box to support hyperlinks and click the dropdown arrow to select the hyperlink
field. Click OK.

..\folder\file.txt indicates that ArcMap should look one level up in the file system for a
folder named folder, and find the file named file.txt.

folder\file.txt indicates that ArcMap should look for a folder in the file system at the same
level that the map document is stored in, and find the file named file.txt.

Created: 10/5/2001
Last Modified: 11/18/2002
Article Rating: (3)
If you would like to post a comment, please login

Comments

By Anonymous - 02/09/2006 7:06 AM

This does not address the "bug" that allows these to only work once ArcMap has been opened, and
then the file with these hlinks are present is loaded in. By double clicking the mxd with these, the
relative links do not work...
Rating:

By Anonymous - 01/09/2006 3:14 PM

Are these the same instructions for ArcGIS 9x?


Rating:

By Anonymous - 01/18/2005 12:48 PM

I have a map file in the following file structure: d:\stream\sligo I have my photos to hyperlink in
d:\stream\sligo\photos When I first set up my hyperlink filed I typed it as "..\photos\filename.jpg"
This created a successful hyperlink. When I opened the map file the second time, the links no longer
worked. I changed this to "photos\filename.jpg", which also did not work. I also had planned to
package this map as a data package and have the hyperlinks work by copying the phot

By Anonymous - 11/23/2004 7:57 AM

a simple diagram might be helpful. jargon like "To specify a path through a folder immediately
below the maps location in the file system" is only helpful if you already know what to do. What if
my floder system is set up slightly different; what should I do? Marc Edwards

By Anonymous - 02/14/2003 8:19 AM

Rating:

You might also like