I am stuck with this issue for days, and yet I could not find a solution.
Long story short, the "arcpy.ApplySymbologyFromLayer_management" simply does not work. The code runs without any issue, I can see the layer briefly locking on ArcPRO, but zero results.
aprx = arcpy.mp.ArcGISProject("CURRENT")workspace = "C:\whatever.gdb"ref_lyrx = r"C:\SimbologyIwant.lyrx"
arcpy.env.workspace = workspace
map = aprx.listMaps('Map')
layers = map.listLayers()
layers2 = map.listLayers()
I also tried
which uses the a layer file instead of a layer on the map. parameters
I refreshed, I ran the code with the map closed, added the optional p, tried all variations that I could think of. The code runs, but the symbology never changes.
Anyone has a sample code that works? Or any idea why my code has no results?