MXD Doctor is a stand-alone application located in the Tools folder of the ArcGIS Desktop installation directory. It provides functionality to analyze broken .mxd files. Depending on the analysis, entities contained in the broken .mxd file can be copied from the broken file into a new or existing .mxd file.
The following entities are analyzed when you run the MXD Doctor utility:
- Maps and data frames
- Page layout
- Visual Basic for Applications (VBA) project
- Style gallery
- Thumbnail preview
After the analysis, the check boxes for each of these entities display the results using the following symbols:
Recoverable | |
Recoverable, although not completely | |
Unable to determine status | |
Not recoverable | |
Not present |
For example, the following document status indicates that the page layout is recoverable, but the maps in the layout are not completely recoverable. The style gallery is not recoverable (this is commonly caused when the document references a style gallery that is not on the computer). The thumbnail preview is not present, and the status of the Visual Basic for Applications (VBA) project is undetermined. If no VBA code exists in the project, the VBA project entity is not included in the document; this is not an error. See the following screen shot:
The MXD Doctor utility is provided as a courtesy to help repair problematic .mxds. Before using this utility, create a backup copy of the broken .mxd file and, if you're using an existing .mxd file as the target, create a copy of that file too.
To use the MXD Doctor interface, follow these steps:
- Create a backup of the broken file and, if you’re using an existing file as the target file, create a backup of the target file too.
- Run MXDDoctor.exe.
The following MXDDoctor Warning dialog box opens to remind you to back up your documents:
- Since you already created backup copies of your documents in step 1, click Yes to continue.
The MXD Doctor dialog box opens as shown in the following screen shot:
- Click the ellipsis button to browse to the .mxd file.
- Navigate to and select the broken .mxd file you want to fix.
You will receive a warning dialog box letting you know that inspecting the map document could take a while. Click OK to continue.
The file name is added to the text box, and the document is analyzed. The results of the analysis are shown in the Document Status frame.
- Once the .mxd file has been analyzed, but before you export it to a new .mxd file, you can do either or both of the following to identify which entities to retrieve:
- Preview the contents of the broken .mxd file to help determine which entities to retrieve from the broken document. Only recoverable entities can be previewed.
The following screen shot shows the MXD Doctor dialog box during preview:
If there is more than one map (data frame) in the document, the Index combo box allows you to select which map to preview. The map's index and name are displayed in the combo box. Panning and zooming of maps and page layouts is supported. The thumbnail view can be viewed only.
- Generate a diagnostic report for all the entities contained in the broken .mxd file. To do so, click Generate to generate the report; the results are displayed on the Report tab of the Viewer frame, as shown in the following screen shot:
The contents of this report can be used to identify possible bad entities. If required, the report can be saved as a text file or printed by clicking the Save or Print button, respectively.
- Preview the contents of the broken .mxd file to help determine which entities to retrieve from the broken document. Only recoverable entities can be previewed.
- Click the Treatment tab.
The Treatment tab opens, and a new document name is displayed in the Target MXD File text box by default. This indicates a new map document is to be created. The default is a document in the same folder as the broken document, with the same name, appended by _new.
- Specify the name and location of the target .mxd file. You can do one of the following:
- Use the default name and location.
- Specify a different name for the new document and/or a different location.
- Choose an existing map document as the target.
- Specify the treatment options.
- If you want to transfer all recoverable entities to the target file, keep the Transfer all non broken option checked and proceed to step 11.
- If you want to control which recoverable entities are copied from the broken document, uncheck Transfer all non broken. The options you control fall into two main categories: PageLayout and Maps, and Miscellaneous. The Enable check box must be checked for the page layout and map options to be chosen. The following example shows options chosen to recover PageLayout and Valid Maps.
- If you unchecked Transfer all non broken, check the Enable check box and choose the entities you want to recover.
The page layout and map entities are linked and have four options, and perhaps restrictions, depending on the analysis of the broken document. The options are as follows:
- PageLayout and Valid Maps: Copies the page layout and valid maps from the broken document to the target .mxd file. This option removes the existing page layout and maps from the target .mxd file.
- PageLayout and New Map: Copies the page layout minus data frames from the broken map document. A new blank data frame is added to the page layout. This option removes the existing page layout and maps from the target .mxd file.
- Only PageLayout: Copies only the page layout from the broken .mxd file, adding the data frames from the target .mxd file to this page layout.
- Only Maps: Copies maps from the broken .mxd file and adds them to the page layout of the target .mxd file.
- Click Fix Document.
Fixing the document copies the recoverable entities from the broken document and places them in the target document.
The progress of the treatment is shown in the area on the right side of the Treatment tab.
All recoverable entities you exported are now in the specified .mxd file.