Instructions provided describe how to salvage a damaged ArcView project file. A project file may get corrupted by system crashes, or by operations that yield one of these errors: Segmentation Violation, Floating Point Exception, Invalid Operation, or Invalid Page Fault. The causes for such situations are varied and are beyond the scope of this document.
Given that the extent of the damage to the project file is unknown, as it varies from case to case, there are various options that may pursued to attempt recovering a damaged project file.
Before attempting the recovery process:
Make a copy of the damaged .apr file under a different name. This backup copy may be needed to revert to if some of the recovery options do not work.
Keep in mind that an .apr file is a type of ODB file (object data base), and so it can be opened and changed using a such as Notepad, WordPad in Windows, and textedit or vi in UNIX.
Import damaged project into a new project.
Select Import from the Project menu; if it opens, the task is complete.
Save this project to a different file name.
Data-oriented project repair:
If the basic recovery process does not work, it may be that the project file has corrupt data or wrong data definitions. It is necessary to identify and replace any corrupt data or wrong data definitions.
Open the .apr file in a text editor.
Use the editor's Find and Replace option to change the drive letter of all the data sources in the project.
For example, if all the data is on drive c:\ and a network is on drive f:\, replace c:\ and f:\ with a non-defined letter (z:\).
Open the .apr file in ArcView.
If ArcView cannot find a dataset, it prompts the user find it. Click Cancel All at that point.
If the project opens, some of the data sets or the references to the data sets are corrupt. It is necessary to use a process of elimination to determine which data set is corrupt:
Open the .apr file in a text editor and search for the string 'Path:'.
Each object referenced by this string is a FileName object, which provides the source name for the data file. When searching for all occurrences of 'Path:', the text lines appear as such:
Path: "c:/ /sample.shp"
Use a textfile, or a piece of paper, to create a list of all data sources, skipping duplicate definitions.
Do a project repair on each data source to determine which data ArcView is unable to find (refer to page 46 in "Using ArcView GIS" book).
For example, assume that the project file contains the following data paths:
Find and replace the pop_90.dbf string with something like 'testing'. When ArcView reads the FileName object referring to 'testing', it pauses and asks the user to find 'c:/gisdata/testing'.
Click Cancel if ArcView displays a prompt to find the data source.
If the .apr file opens successfully, there is something wrong with that data set or a reference to that data set. Save the project without the corrupt data set.
If the project still does not open, test each data set until the set or sets are found that are keeping the project from opening.
Document-oriented project repair:
If, after removing all the data sets from the project, it still does not open, it is likely that there is a corrupt document object. To determine if there is a bad reference in the document list, again, it is necessary to use the process of elimination.
Restore the .apr file from the backup copy you made earlier.
Open it in a text editor. The top of your .apr file should look like this:
Delete all but one of the document references. It is recommended that you keep the very first document in the list. If you have an Active Document, you need to delete that one as well.
Save the project.
Open it in ArcView.
If the project opens, you will most likely be able to salvage most of the project.
If it does not open, use a process of elimination on groups of documents to indentify the documents that are causing the project to crash. Take notes so you do not lose track of the documents you will be eliminating. When you remove a group of documents and the project opens, you will know that one or more of these documents that you eliminated are corrupt. If the project does not open, then you can assume one of the documents you left in the .apr file is causing it to crash. Use the editor's Undo function to restore the document references that were previously deleted, or restore the entire .apr file from the backup made earlier. Select a group of documents to eliminate and continue testing documents until you are certain that none of them are corrupting your project.
Once the corrupt documents are found, remove them, save the project, reopen it, and re-create those documents.
It is possible to keep the .apr file open in the text editor while running the above tests. If using a Windows platform, and unfamiliar with text editor, memorize these key sequences: After recovering the project, whether completely or partially, it is highly recommended that the user makes and maintains a backup copy of it during the normal course of work. It may be necessary to revert to it in the eventuality that the main file becomes corrupt again.
Ctrl+Z will Undo the last edit
Ctrl+F is the shortcut to Find (except in Notepad)
Ctrl+H is the shortcut to Find and Replace (except in Notepad)