Hello everyone,
We have a number of MXD's that have a combination of SDE layers and other sources. I am trying to figure out the best way to update only the SDE sources, in python, so we can change them from DEV to PROD but not update local sources.
I have found using the layer.replaceDataSource will change all in the layer and for some reason layer.findAndReplaceWorkspacePath is not working on some features.
Any advice would be very much appreciated.
Regards
Dean
Solved! Go to Solution.
I used layer.replaceDataSource to perform this automated work in the past.
To differentiate SDE layers, I used the .supports("SERVICEPROPERTIES") as a True (Y) for this query which means the layer originates in SDE.
You will also probably need to deal with group layers that have SDE layers in them so your python code needs to handle them as well.
I used layer.replaceDataSource to perform this automated work in the past.
To differentiate SDE layers, I used the .supports("SERVICEPROPERTIES") as a True (Y) for this query which means the layer originates in SDE.
You will also probably need to deal with group layers that have SDE layers in them so your python code needs to handle them as well.
Thanks Michael, that worked a treat