mxd = arcpy.mapping.MapDocument(r"j:\mxdfiles\mxdname.mxd") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] updateLayer = arcpy.mapping.ListLayers(mxd, "TestFC", df)[0] sourceLayer = arcpy.mapping.Layer(r"j:\test\test.lyr") arcpy.mapping.UpdateLayer(df, updateLayer, sourceLayer) mxd.save()
mxd = arcpy.mapping.MapDocument("CURRENT")
arcpy.RefreshTOC() arcpy.RefreshActiveView()
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.