updating a text element in an mxd is not working for meArcGIS 10 - 10.1.2800there is a text string element in the mxd "SHEET 3002" that i want to change based on a variablethis was tested on an mxd that only has this text element in it and nothing elsethis is the code to change the text element it that is not working:import arcpy
import arcpy.mapping
MXD = arcpy.mapping.MapDocument("CURRENT")
for SheetNum in arcpy.mapping.ListLayoutElements(MXD, "TEXT_ELEMENT", "SHEET*"):
SheetNum.text = "SHEET 7001"
if the code is:import arcpy
import arcpy.mapping
MXD = arcpy.mapping.MapDocument("CURRENT")
for SheetNum in arcpy.mapping.ListLayoutElements(MXD, "TEXT_ELEMENT", "SHEET*"):
if SheetNum.type == "TEXT_ELEMENT":
SheetNum.text = "SHEET 7001"
still nothing happensif i try:SheetNum = arcpy.mapping.ListLayoutElements(MXD, "TEXT_ELEMENT", "SHEET*")[0]it returns: Runtime error <type 'exceptions.IndexError'>: list index out of rangewhat is wrong with this?