I'm migrating my data to a new server and I have 1000's of MXD's which will have broken layers due to the new location of the data.
Is there a method of sourcing all these MXD's to the new data location from multiple machines using single-use licenses?
I've come across this thread a couple times with no clear answer form what I could see.
You can use python to script the resourcing of all your map documents.
A simple example would be...
mxd = arcpy.mapping.MapDocument(r"C:\ResourceMe.mxd")
for lyr in arcpy.mapping.ListLayers(mxd):
wsp = lyr.workspacePath
ds = lyr.datasetName
lyr.replaceDataSource(r"C:\Users\userprofile\AppData\Roaming\ESRI\Desktop10.0\ArcCatalog\DirectConnect.sde", "SDE_WORKSPACE", ds, False)
lyr.name = ds
I've downloaded your add-in and every step works great until step 5.
I get the following error message:
I'm currently running 10.6 and here is a snippet of my "UpdateToNewDrive.csv"
I haven't tested on 10.6, so that might be the issue. But you can try to unzip the .addin and go directly to the toolbox. Right-click on the tool and Source. See if it can find the .py script for the tool. You may need to go up a folder to find the scripts folder.
I know I have had some issues with 10.5.1 with the "store relative path" for the script doing some weird stuff (trying to look on the "C$" share) when upgrading to newer version. It was developed mainly on 10.2.x.
The only other thing might be if you have spaces in the path names. I can't remember if I handle things for that.