mxd = arcpy.mapping.MapDocument("CURRENT") lyr = arcpy.mapping.ListLayers(mxd, "lyr") lyr.symbology.addAllValues()
mxd = arcpy.mapping.MapDocument("current") df = arcpy.mapping.ListDataFrames(mxd, "layers")[0] myShape = arcpy.mapping.ListLayers(mxd, "MyShape")[0] lyrFile = arcpy.mapping.Layer(r"C:\Path\To\layerfile.lyr") arcpy.UpdateLayer(df, myShape, lyrFile, True)
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.