The first and most important
arcpy.mapping module use is to identify and fix the broken links between layers in a map document and their data sources. Layer symbology and GIS data storage are separated, meaning that layer data sources are often moved.
Arcpy.mapping offers a quick solution, though imperfect.
This solution depends on a number of methods included in the
arcpy.mapping module. First, we will need to identify the broken links, and then we will fix them. To identify the broken links we will use the
ListBrokenDataSources() method included in
ListBrokenDataSources() method requires an MXD path to be passed to the
MapDocument() method of
arcpy.mapping. Once the map document object ...