XTools Website

 

Note: this tool is updated in XTools Pro 16.1

 

Change Datasources

 

 

Purpose

 

Do you often see red exclamation marks by the layer names in the Table of contents of your ArcGIS map documents? Lost and broken links to data sources in the maps can be a real problem, especially when you do not know exactly where the data is actually stored. The XTools Pro Change Datasources tool addresses the problem of incorrect and lost links to data sources in ArcGIS map documents resulting from moving, copying or sharing map documents.

 

Description

 

With XTools Pro Change Datasources tool you can easily fix invalid paths to datasets in ArcGIS map documents. Incorrect links can be fixed manually and automatically. Another tool usage scenario is when you need to specially change data sources and re-direct layers to other datasets.

 

 

Changing data sources

 

If you open an .mxd map document and see that links to data sources are broken for some layers (i.e. they are grey and marked with red exclamation mark) you can try to fix broken links with the Change Datasources tool. For that select the tool from the XTools Pro Data Management Tools menu:

 

 

The tool dialog will appear listing all map layers and data sources and indicating if the links are valid, broken or changed. In the example below the map document saved with full path names to data sources was moved to another directory on disk along with the data. As a result, some of the links to data sources are invalid:

 

 

In the Change Datasources dialog you have a few options, listed on the top:

 

  • Fix all

- allows to automatically fix all invalid links in the map

  • Reset all

- resets all changed links to the initial state

  • Fix selected

- allows to automatically fix selected invalid links

  • Reset selected

- resets selected links to the initial state

  • Other

- Load links from the previously saved file

- Save links to a file on disk

 

Note: a few items can be selected with the Ctrl or Shift buttons.

 

All invalid links in the map fixed (changed to valid ones):

 

 

Now you can press OK and see that layers appear in the map.

 

 

Changing data sources manually

 

It is also possible to change data sources manually, no matter if they are valid or not:

 

 

Standard ArcMap select data source dialog appears allowing to manually select the required dataset.

 

 

Searching for similar data sources

 

Besides changing data sources manually you can search for similar data sources automatically, the option is available from the Options menu on the right:

 

 

Searching for data sources are separate processes for each item. You can see how many candidates are found at the moment and you can also stop searching process for each item:

 

 

After searching process is finished or stopped you can view search results and select the one you need:

 

 

 

Applying a data sources to other layers

 

Valid data sources (initially valid, fixed or changed manually) can be applied to other layers in the map:

 

 

 

Besides, for often used cases and scenarios data sources can be saved and loaded as XML files:

 

 

 

Fixing and searching algorithm

 

Here is how searching for data sources works:

 

  • Searching begins from the start folder specified in the Customize dialog, by default this an MXD document folder.

  • After searching in the Original Folder and Document Folder (taking into account all options) it continues searching on all logical drives but only in the root folders, without getting deeper in the folders.

  • Then it searches in all Folder Connections, if this option is selected. All customized options are taken into account.

 

Note:

Customize settings (search start folder, search depth, search in sibling folders, and search in all folder connections) are not applicable to SDE database connections.

 

 

Ranging search results

 

Automatic search results are ranked according to the following criteria (from high to low priority):

 

  • Dataset location

- Datasets from the Original data folder or MXD document folder (as specified in the Customize dialog) have higher rank.

 

  • Path length

- The closer the dataset is to the folders above, the higher is its rank.

 

  • Proximity to the original workspace name

- Levenshtein distance is compared between found and original workspaces, workspaces with shorter distance have higher rank.

 

  • Workspace type (file system, local, remote)

  • Data format (file or personal geodatabase, shapefiles)

- Candidates with the same or similar workspace or data format have higher rank.

 

---

 

Table of Contents

-Search-

Back