[GIS] Change data source for multiple layers in ArcMap document

arcgis-10.3arcgis-desktoparcmap

I have a master copy of some data i'm working on on a remote server. Sometimes I make a copy on my local drive to speed up processing times, but data sources in my MXDs still point to the remote server.

I'm wondering whether there is a quick and easy trick to update the data source for all layers in ArcMap, without going into Python Scripting etc. I know I can update each individual data source through layer properties, and I have been using a workaround by 'breaking' the link to the remote server, then pointing one layer to the new source (when it has a red exclamation mark in the TOC), which then allows the other layers to find their relative sources. Is there a more elegant way of doing this?

Best Answer

Instructions provided in Use the 'Set Data Source' tool for map documents in ArcCatalog describe how to use the Set Data Source tool for map documents in ArcCatalog.

When right-clicking a map document (.mxd) file in ArcCatalog, a Set Data Source command is visible. This opens a dialog box that makes it easier to update or repair some or all of the references to file-based data sources in the map. By default, this dialog box creates a copy of the .mxd file. This option is also available by right-clicking a published map (.pmf) file, although it is disabled if the publisher of the .pmf file selected not to provide full access to its contents in ArcGIS applications when it was published.

The Set Data Source tool cannot be used to update or repair references to data in ArcSDE geodatabases.

The Set Data Source tool does not support VBA customizations. Any VBA customizations are not included in the output MXD.

The Set Data Source tool does not support personal geodatabase annotation layers at this time. This is a known limit and is scheduled to be fixed in a future release of the software.

Procedure Follow these steps to set the data source for an MXD in ArcCatalog.

  1. Right-click an MXD in ArcCatalog and click Set Data Source(s). The default creates a copy of the MXD. It is recommended that a copy be used and the original MXD be kept as a back-up. However, the existing MXD can be overwritten by selecting it or typing its full path.
  2. Select a data frame or all data frames.Select a layer or press the Select All button.

  3. Click Replace or Replace All. The Replace dialog box does a 'find and replace' on the paths to the data. Type the 'find and replace' text to match the data. For example, if all the data was in C:\GISData but it has been moved to C:\GISData2, the Find What text box shows C:\GISData and the Replace With text box shows C:\GISData2. Click Replace. Click OK in the Set Data Sources dialog box.

There is also a MXD Data Source Replacer script in the UCLA Sandbox.

Related Question