Relative Paths and Path Variables

 

 

 

Where are File Paths Used?

There are several places throughout Think GIS where the path to a file is stored. Most of the time this is handled behind the scenes, but occasionally user intervention is required in which case is important to understand how Think GIS is designed to work with paths.

 

Relative VS Absolute Paths

There are two ways to store a path:

a) specify an absolute path such as "C:\ThinkGIS\Tenafly\ Photos\ Bldg27.jpg", or

b) specify a relative path using a path variable such as "%MapDir%\Photos\ Bldg27.jpg"

 

In the case of the absolute path, users know exactly where the file is located. The problem is, not everyone on the network may refer to this same location as their "M:" drive. And what if the entire set of files is moved to the K: drive. Every stored path that refers to one of these files would have to be changed. This problem also applies to remote or laptop user's who may download the files to the local C: drive. Think GIS will accept Absolute File Path's anywhere a path is requested but it is strongly recommended that this practice is avoided.

 

In the case of the relative path above, a path variable is used. This allows the full path to be interpreted differently from one computer to another. Any variables in a path get replaced with an actual directory name whenever they are used. See the list of variables below.

 

Path Variables

%DataDir% Directory specified in Data Dir column of Layer Settings for a specific layer. When not specified, %DataDir% defaults to the directory where the layer file is stored.

%MapDir% Directory where the currently open map file (.tgm) is stored.

%TMDir% Directory where Think GIS (tm4.exe) is running from.

 

 

 

Copyright © 2024 WTH Technology