Data Source Manager
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 Data Source Manager 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 Data Source Manager 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 Data Source Manager tool. A corresponding message suggesting to fix broken links is automatically prompted right after you open a map document with lost data sources. To do that manually later select the tool from the XTools Pro Data 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 Data Source Manager 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 -
Change all
allows to set the same new workspace (geodatabase or folder) for all layers manually -
Stop searching
stops all searches -
Other
Load links from the previously saved file
Save links to a file on disk
You can select a few items with the Ctrl or Shift buttons and operate with them only. Commands for selected links (Fix, Change or Reset, Stop searching) are available from selection context menu.
All invalid links in the map fixed (changed to valid ones):
Now you can press OK and see that layers appear on the map.
Note
Only valid links are applied to the layers after pressing OK button.
Changing data sources manually
It is also possible to change data sources of each item manually, no matter if they are valid or not. You can use Change command to select required dataset in Catalog:
... or type the path in entry field:
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 workspaces 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 search start folder specified in the XTools Pro Options dialog, by default this is an MXD document folder.
-
Searching moves up from the start folder to the drive root and down to the sub-folders with the search depth specified in the XTools Pro Options.
-
Searching continues in the folders sibling with the start folder (If the option is selected in the XTools Pro Options) with the search depth.
-
After that, searching in the other options of Search start folder is produced in the same way.
-
Then it continues on all logical drives changing the drive letter in the original layer link only.
-
At that, data sources are searched in all folder and database connections (If the option is selected in the XTools Pro Options), searching also moves up from the connected folder to the drive root and down to the sub-folders with the search depth and continues in the folders sibling with the connected folder with the search depth (if corresponding options are selected in the XTools Pro Options).
Note:
If the original data workspace is the enterprise geodatabase, data sources
for this dataset are also searched in this enterprise geodatabase. At
that, searching in the enterprise geodatabase is produced if the link
to this SDE geodatabase is applied to the selected layers.
Ranging search results
Automatic search results are ranked according to the following criteria (from high to low priority):
-
Dataset location
Datasets from the search start folder (as specified in the Options dialog) have higher rank.
-
Path length
The closer the dataset is to the drive root, the higher is its rank.
-
Proximity to the selected start folder
Levenshtein distance is compared between found workspaces and the specified search start folder, workspaces with shorter distance have higher rank.
-
Workspace type (file, personal or enterprise geodatabase, shapefiles or other data types)
Candidates with the same workspace as the original layer link have higher rank.