AnsweredAssumed Answered

Batch Apply Definition Query to all layers (within MXD)

Question asked by admartian on Apr 1, 2014
Latest reply on Apr 3, 2014 by AdamCox
Hey Guys,
So here's the issue

  • I have multiple mxds in a folder

  • there are subfolders within this parent foder (e.g. c:\Temp\Folder1 etc)

  • Each MXD has varying number of layers/feature classes

  • Some MXDs have layer groups

  • The query I want to apply is so: "VALIDATIONSTATE = 3"

  • All layers/FCs have the field above (VALIDATIONSTATE) so no worries there (Except of course non-vectos etc)

Is there any way I can

  1. Apply this en masse for each mxd?

  2. If yes, would it be possible to apply en masse, to each mxd, for a given folder? (I'm willing to forego applying to subfolders, and just moving everything to one folder if need be)

I've tried so many code snippets online to no avail. Any help would be appreicated!!