AnsweredAssumed Answered

Add a definition Query with python

Question asked by peterverst on Feb 19, 2015
Latest reply on Feb 19, 2015 by OCatton

I want to add a difinition query with python so far i have this

import arcpy  
mxd = arcpy.mapping.MapDocument(r"Y:\TRUTTA\Trutta_new\TruttaMaps\test.mxd")

for lyr in arcpy.mapping.ListLayers(mxd, "*"):
    if == "chimney_p":
        lyr.definitionQuery = """"Trutta_Map" = '19A4'"""


In my pythonWin it seems to work BUT the query in my shape did not get the new query.

anyone know why that is ?