I would like to update misc text in an active map window but can't seem to crack the code and I found some presentations that mention it can be done but the full code isn't there.
The following is from an ESRI presentation @ http://www.google.com.au/url?sa=t&source=web&cd=3&ved=0CCMQFjAC&url=http%3A%2F%2Fproceedings.esri.com%2Fdvd%2Fuc%2F2010%2Fuc-index%2Fuc%2Fworkshops%2Ftw_1433.pdf&ei=2R3STZmoAefTiAKT9oTyCg&usg=AFQjCNH-wFZb1mgpnWrV1QKQD5ynZtikfg&sig2=UBLu89hwpAx72djEJggFJg
import arcpy
findText=arcpy.GetParameterAsText(0)
replaceText=arcpy.GetParameterAsText(1)
mxd=arcpy.mapping.MapDocument("Current")
for textElm in arcpy.mapping.ListLayoutElements(mxd,"TEXT_ELEMENT"):
if findText in textElm.text:
textElm.text=textElm.text.replace(findText, replaceText)
I want to be able to enter text string "This is the old text" and replace with "this is the replacement text"
Simple find-->replace that word or notepad does but in an active ArcMap.