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()
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.