Tuesday, October 29, 2013

Final Script to fix DataSources in ArcGis via ArcPy.

This is a followup to this previous post here, that describes how to implement a script that fixes datasources when moving an mxd from one work space to a new work space. Anyhow, after several days of running the initial script to fix ArcGis dataaources there were several enhancements or feature request submitted. The request are as follows, the script would need to move any data sources to a central location within the new work space. The script would also need to be updated to handle geodatabases.

While updating the script I took the initiative to make it more generic and I converted some constant variables to command line parameters so that it may be applicable to anyone. I also applied some clean coding standards for readability and good coding practice.

Anyhow the properties of the scripts or commandline parameters are as follows:

And I have taken the liberty to make the full working script available to anyone interested and can be found here.

Script has been updated, there was a couple of bugs with the copy method please read through the commit log for more information.

No comments:

Post a Comment