Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've inherited a large somewhat messy database and am attempting to clean it up a bit. Does anyone know if it is possible to search a database to see what arcGIS map documents use a feature class? I'd like to delete old versions of my feature classes, but don't know if they are in use in a mxd somewhere. This would also be useful to see what mxds need to be updated because they're using old versions of data. I'm envisioning a search in ArcCatalog that specifies a feature class and returns a list of mxds and maybe relationships that use said feature class.

Any suggestions appreciated. Thanks in advance!

share|improve this question
1  
Sounds like you are going to want to search your mxds for the featureclass. Take a look at this –  Chad Cooper May 23 '13 at 23:11
add comment

2 Answers

up vote 1 down vote accepted

Funny this as I've just spent the last few days developing Python code to do this... Chad's link is definitely the page you need to be looking at and PolyGeo's link to the walk function is useful too.

I developed 3 scripts: one for trawling the drive space searching for datasets, a second to trawl for MXDs then extract all the layer information and a third to fix broken links (after everything had been moved to a new folder structure).

Top tips:

  1. You may have 1 or more dataframes to search.
  2. You may have the same dataset duplicated but different featurelayer names.
  3. You may have layers with no featurelayer names.
  4. You may have datasets that are not in any mxds.
  5. You may have datasets referenced in the MXD but do not exist anymore or inaccessible locations such as document and settings.
  6. You will almost certainly have crazy names with superscripts or commas which need dealing with in Python.
  7. I found that the dataset name referenced in the mxd is not necessarily in the same case as what's on the drive so making text matching problematic.
  8. A raster dataset may be simply an image such as a logo so you need to exclude these from your search.
  9. When you use the da.walk function and ask for tables it will return any text file and even asc files for some reason.

You'll need to consider all these scenarios and probably more for your setup.

share|improve this answer
add comment

The arcpy.da.Walk function that was introduced at ArcGIS 10.1 SP1 will give you a headstart to building such a tool.

Alternatively, there is an excellent commercial product available called Voyager that already does this in a great user interface.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.