I'm using ArcGIS 10.3
I need to automate the process of "Repair Data Source"
anyone knows what tool to use in modelbuider or python function to make a Repair Data Source
Solved! Go to Solution.
Hi Gustavo, you can use the Find and Replace Workspace Paths method:
import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project_SDE1.mxd")
mxd.findAndReplaceWorkspacePaths(r"Database Connections\Connection to GISSDE1.sde",
r"Database Connections\Connection to GISSDE2.sde")
mxd.saveACopy(r"C:\Project\Project_SDE2.mxd")
del mxd
Hi Gustavo, you can use the Find and Replace Workspace Paths method:
import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project_SDE1.mxd")
mxd.findAndReplaceWorkspacePaths(r"Database Connections\Connection to GISSDE1.sde",
r"Database Connections\Connection to GISSDE2.sde")
mxd.saveACopy(r"C:\Project\Project_SDE2.mxd")
del mxd
this tool can be used to replace me specific layers?