Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Batch Apply Definition Query to all layers (within MXD)

$
0
0
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!!
Thanks!

Viewing all articles
Browse latest Browse all 2485

Trending Articles