Hi
I have an mxd that contains the same shape file numerous times so that I can portray it in different ways on the map,
I would like to be able to change the definition query for these shape files with out having to go to each file and change each one at a time
Is there some type of a tool or script that can change the same file's definition query with in a mxd
This can be done with Python, you could have a tool that lists all the layers in a mxd, then changes the defintion query value for each of them.
Within the map document, this is what you would need in the python window. If you have multiple dataframes, you would need a bit more code.
import arcpy mxd = arcpy.mapping.MapDocument("Current") layers = arcpy.mapping.ListLayers(mxd) for layer in layers: if layer.supports(definitionQuery) layer.definitionQuery = """FieldName = 'Value'"""