How To: Handle issues related to project and data portability


1) Project and data CD creation for distribution to other ArcView users.

2) Prepare for frequent data movement, so that the project repair process can be avoided. What key issues and concerns to keep in mind to do this.

3) Make creative use of environment variables to ease data and project movement to allow for projects and data to be used by multiple users in shared directories, and to allow projects to be used by ArcView on different platforms.

Placing project files and the source data like shapefiles, tabular data, and coverages that point to a CD is a relatively popular way of distributing
ArcView projects to other ArcView users.

ArcView occasionally writes files to the location of the source data as in the case of table indexing, the non-writable nature of a CD causes ArcView to write those files to the current working directory, which is writable. This is normally the '$HOME' environment variable.

It is common to need to deal with project files (*.apr) and the absolute pathnames that are stored within them, so that adjustments can be made when the project file or its associated data sources have been moved. If a project file is opened, and it cannot find the data in the same location, the project repair process triggers. File Dialog browser windows appear when opening the project. The title window displays "Where is...", followed by the last portion of the data source path. It is up to the user to enable the file browser to redirect ArcView to point to the new data location. Once this process has finished, and the project is saved, the new paths will be remembered for the next time the project is opened. When using ArcView as an application development platform, or when producing many project files for wide distribution, this project repair process can become cumbersome. It may often be beneficial to prepare the projects ahead of time, in order to make the distribution and use of the projects as easy as possible for the end-user.


  1. Organize the data used with the project onto the hard drive into the desired direcory structure that will be reflected on the CD. For this example, the directory is 'C:\mydata'. This directory holds an entire sub-directory tree system under it.

  2. Start a new project, immediately setting the working directory to be the directory that stores all of the data. Do this in 'Project Properties'. Reset the default entry, which is '$HOME', to be the absolute path 'C:\mydata'.

  3. Build the project file using this data, being careful to store additionally created data into this working directory as well. Setting the working directory in Step #2 above will help do this.

  4. The last step before saving the final copy of the project file is to use 'Project Properties' to reset the working directory back to '$HOME'. This is done so that when reading the data directly from the CD, ArcView will have a place to write local files.

  5. Once the project is completed, open the .apr file in an ASCII text editor, and use the search-and-replace function of the text editor in order to replace the beginning of every path statement in the .apr file with an environment variable. For example, if the data is stored in a directory tree under 'C:\mydata', search for the string 'C:/mydata/' and replace all occurrences of this with an environment variable like "$UNIVNEB/". In addition, ArcView has a sample Avenue script called 'subpath.ave' which automates the task of pathname replacement.

  6. Copy the .apr project file, and 'c:\mydata' directory tree onto the CD.
  7. When distributing the CD, give instructions to copy the 'mydata' directory to the harddrive and use the autoexec.bat file to set the $UNIVNEB variable to point to it:


    Or, instructions to leave the data on the CD and use the autoexec.bat file to set the $UNIVNEB environment variable to the CD drive; for example:

    SET UNIVNEB=D:\mydata

    If you are going to keep the project, but you want it shareable by different users on different platforms, ensure that the environment variable on the PCs is set as shown above, then set the environment variable on the UNIX machines; an example is:

    setenv UNIVNEB <path to where the data is>

Related Information