Select to view content in your preferred language

PYthon Script No Longer Works Correctly

817
3
05-29-2013 11:50 AM
TerryHiggins1
Occasional Contributor
First let me state that I am not very experienced with Python. I had captured a script from ESRI that I think I might have tweaked. However the script worked fine to produce output in a text file. Now when I run it whether intereactive or from a script all I get is a listing of the MXDs within the interactive window and in the text file I basically get the header information and nothing more. The last time I ran this was in August last year.
Can someone assist me in identifing what I am doing wrong or what might have changed?
Note I am running 10.1 on Win7
Thanks in advance
Terry
Tags (2)
0 Kudos
3 Replies
ThaiTruong
Deactivated User
You also need to modify:
#Read input parameters from GP dialog
    folderPath = arcpy.GetParameterAsText(0)


to:

#Read input parameters from GP dialog
    folderPath = parentDir


Also, making sure there's a "PyTest" folder under your C drive for this to work.
0 Kudos
TerryHiggins1
Occasional Contributor
Thanks I got it to work. I would like to enhance this script to do some additional things but not sure how to approach. Any chance you could assist on this and point me in the right direction?

1.) Locate a particular FC within the MXD and it's data source
Example - we receive an updated shapefile from the county and want to verify all MXD data sources are pointing to the correct file. I am trying to get all MXDs to use the same geodatabase.

2.) Only report on MXDs that have broken data sources
0 Kudos
JimCousins
MVP Alum
You need to look at the following link:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000020000000

towards the bottom is a section "Using the arcpy.mapping module to find and repair data links for a number of map documents"

Regards,
Jim
0 Kudos