|
You will be required to submit your final project as a transportable
project on a removable media (3.5" disk, 100mb Zip disk, CD), so
this is a chance for you to learn and practice that skill. A transportable
project is one that will open on any computer without the user having
to identify the location of individual data files.
Alternatively, you may use a script by following the instructions at
this link.
Before you begin working on your ArcView project, we suggest you read
these instructions and, if necessary, practice with one of your ArcView
projects from a previous time, so that you understand how you are going
to create your transportable project.
- Why does my project need to be
transportable?
Have you ever opened an ArcView project and seen
messages like the one below? If you try to open a project and ArcView
cannot find the project's data, you will be presented with a series
of "Where is?" boxes asking you to locate every file used in
the project. If your project is transportable, you will not
run into this problem.
- How do I make my project transportable?
- How do I save my data in order to make my
project transportable?
In ArcView, work is organized and stored in
project files. These files do not store copies of the data used
in the project, instead project files store references to the
data. These references are "hard-coded" to the location
of the data when the project was created. (To learn more about
project files read the Good
ArcView Habits page)
However, data will probably be moved and people
often share projects and data on different computers and network
drives. To ensure that your project is flexible enough to open
even when data locations have changed or are different for different
users, you must make your project transportable. There are a couple
of ways to do this; this FAQ will use the relative paths method.
(See Assignment 10 for alternative methods) For this to work,
you will need to store all the data used in your project in a
subfolder of the folder where your project file is stored. For
example:
 |
| In this case, the project file is stored
in the folder named: ProjectFolder and all the data used in
the project is stored in the folder named: dataSubdirectory.
(You may use your own folder names by replacing them in the appropriate
places.) c:\temp\Projectfolder\Subdirectory\cities.shp |
- How does ArcView look for where I save my data?
When you open your project in ArcView, ArcView
looks for the data used in a project and reads a line in the project
file. For example: The path the project file would look for the
cities shapefile from the figure above to be located in "c:\temp\Projectfolder\Subdirectory\cities.shp".
- But if that is where the project file is
looking how do I move my project to removable media?
In this example the shapefile location or path
is "hard-coded" to the temp folder on the c drive. Different
computers can have different drive letters for the removable and hard
drives it uses. (eg The zip drive on my home computer has a drive
letter of d while my zip drive at home has a drive letter of e.) To
remove "hard-coding" to a specific drive letter you must
create relative paths to the data used in the project.
- What are relative paths?
Relative paths are used to remove the "hard-coding"
of a file path to a specific drive letter. The creation of relative
paths to a shapefile or other data in an ArcView project (.apr)
relies on the way the ArcView program reads the .apr files. When
relative file paths are used, the first place ArcView looks for the
data is in the same folder as the project file, by default.
That fact is important to the method used for creating relative file
paths in ArcView project files (.apr).
- How do I create relative
paths to the data in my project file?
By default the ArcView program will always look
for data that has been given relative paths in relation to the location
of the project file (.apr). For this reason, if we change the file
path line in the project file (.apr) to remove the "hard-coded"
portion of the file path (i.e.: c:\temp\Projectfolder\Subdirectory),
the project and its data can be stored anywhere.
Selection of the portion of the file name that
is "hard-coded" depends on the number of subdirectories
in which the specific data file is located. For this reason it is
a good idea to set up the file folder structure you plan on using
with your project as early on as possible in the project creation
process. If you are good with file management and directory structure
you can fix poorly designed file directory structure while you are
creating your relative paths but be aware it can become very
complicated.
The specific relative path you will use also depends
on where you plan to transport the project. For example:
| If the Hard coded path is: c:\temp\Projectfolder\Subdirectory |
If the Hard coded path is: c:\temp\Project\data |
| the Location of data on the
removable media will be in: |
the Location of data on the removable
media will be in: |
| The subdirectory in the project
folder (Projectfolder\Subdirectory) |
The data folder (data) |
| And the project file (.apr) will be placed in the: |
And the project file (.apr) will be placed in: |
| The project folder (Projectfolder)
|
On the disk but not in any folder |
| then the portion of the hard-coded
path that must be removed is: |
then the portion of the hard-coded
path that must be removed is: |
| c:\temp\ |
c:\temp\Project\ |
Note: the direction that follow assume all
the data are stored in one file folder. If you choose to store your
data differently you will have to adjust your relative paths accordingly.
- How do I update the project file (.apr)
to create relative paths?
To update the project file to include only the
name of the subdirectory folder, you will need to open the project
file (i.e.: myproject.apr) in a text editor (For example: NotePad).
1. Open a text editor. Note:
Notepad is recommended!
2. From the File menu, choose Open
- In the dialog box,
change the Files of type to be All Files
- Navigate to the location of the apr file you
are making transportable.
- Select your .apr project file.
3. Now you will use Find to find the path
names to your data.
4. Now you have to change the hard-coded paths to
make the project transportable:
- Write down the path name. (Or you can copy and
paste)
Note! Be
very careful with spaces and capital letters - ArcView is case-sensitive.
- Return to the top of the file and from the Search
menu choose Replace.
- In the Find What textbox type in the path
information up to and including the folder the project data is stored
in: "C:\TEMP\ProjectFolder\dataSubdirectory" (without the quotes!).
Click on "Find Next" to be sure you typed it correctly. Notepad
should jump to the first path in the file.
- In the Replace with: textbox type the
following (without the quotes!): "dataSubdirectory " (Make
sure you type the exact folder name including capitals etc.).
- Click on Replace All. Notepad will replace
all the path names with the shortened version.
- From the File menu, choose "Save as"
- Change the "Save as Type" to "All Files".
- Type in a different name for the project file
with the .apr extension (example: port.apr).
- Click Save.
- Close your text editor.
Now your project is transportable. If you move the
folder containing the project file with its subdirectory data folder
the project will still work. Also if you copy this folder to another
computer it will still work as long as you keep the subdirectory data
folder in the same folder as the project file.
Note: Everytime you save an
ArcView project the relative paths become "hard-coded" again.
Remember if you make changes and resave the project that you must recreate
the relative file paths.
|