I have an mxd which contains a layer (in shapefile format).
I wish to update the path of the shapefile to the path of another shapefile by using a stand alone script.
Is this possible?
I have used arcpy.mapping.AddLayer to find my layer.
I wonder if I can now use .replaceDataSource to update the source of the layer in the mxd?
Solved! Go to Solution.
Did you try it and it didn't work?
Not sure what the problem is unless you don't have the files anymore to try.
Look at UpdataLayer which essentially does a remove and add
Did you try it and it didn't work?
Not sure what the problem is unless you don't have the files anymore to try.
Look at UpdataLayer which essentially does a remove and add
You can also check to see if any of the tools in my addin will work. I mainly works on broken links but can be adapted to work with any.