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

definition query and mosaic dataset from gdb ArcMap 10.1 SP1

$
0
0
I have a Python AddIn Combobox to select a value from the drop-down list. This value changes the definition query of the layers in mxd. This works fine for "normal" feature classes, not for a mosaic dataset. On the Layer Properties dialog box the DefinitionQuery tab is empty.
Code:

layer_lst = arcpy.mapping.ListLayers(arcpy.mapping.MapDocument("CURRENT"))

for layer in layer_lst:

  if layer.name in ('dted_hillshade','dted_dem6x6') and layer.supports("DEFINITIONQUERY"):

      layer.definitionQuery = "\"NAME\"=\'000E00N.DT2\'"
      arcpy.RefreshActiveView()

Does anyone one know a workaround to set a correct definition query for mosaic dataset?

Thanks PolyGeo, the problem encountering NIM067173 or NIM076742...

Viewing all articles
Browse latest Browse all 2485

Latest Images

Trending Articles



Latest Images