I have a Python assignment where I have to write a script to change the style of the north arrow from “ESRI North 4” to “ESRI North 1”. I wrote the following code:
import arcpy mxd = arcpy.mapping.MapDocument(r"F:/Lab9/Georgia.mxd") for elm in arcpy.mapping.ListLayoutElements(mxd, "MAPSURROUND_ELEMENT"): if elm.name == "North Arrow": elm.style = "ESRI North 1" mxd.save() del mxd It gave me no error, but It didn't change the existing style to the one I required.
أكثر...
import arcpy mxd = arcpy.mapping.MapDocument(r"F:/Lab9/Georgia.mxd") for elm in arcpy.mapping.ListLayoutElements(mxd, "MAPSURROUND_ELEMENT"): if elm.name == "North Arrow": elm.style = "ESRI North 1" mxd.save() del mxd It gave me no error, but It didn't change the existing style to the one I required.
أكثر...