I have script that should add lyr file from server. It is like a multiple symbology to certain layerin TOC, i.e. I have a feature class called tline and different symbology layers like tlineA, tlineB. My goal is to have independent tline layer and upload tlineA and tlineB layers to TOC and change their data sources. I made a script tool that already can read paths to tline and tlineA, tlineB and should change the data source of tlineA
Here is it
ab = arcpy.Describe("tline") path = ab.path ao = arcpy.Describe("tlineA") peth=ao.path for lyr in arcpy.mapping.ListLayers(mxd, "",df): if lyr.name == "tlineA": lyr.findAndReplaceWorkspacePath (peth,path) print lyr.dataSource
But anyway the datasource of tlineA remains the same as it was before. I also tried like
But still doesn't work.