AnsweredAssumed Answered

Changing the properties of a text element in the page layout

Question asked by matteo.alesi82 on Oct 6, 2014
Latest reply on Mar 8, 2015 by dkwiens

I'm trying to change the properties of a text element in a page layout through an add-ins button (see the code below), but I get an error message in the Python window

 

import arcpy
import pythonaddins

class ButtonClass1(object):
    """Implementation for test_addin.button (Button)"""
    def __init__(self):
        self.enabled = True
        self.checked = False
    def onClick(self):
        mxd = arcpy.mapping.MapDocument('current')
       Ll=arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):
       for elm in Ll:
            if elm.text="Text":
                 elm.text="Text1"

 

 

Thanks in advance for any help

Matteo

Attachments

Outcomes