I am using ArcGIS 10.4.1.
Can you let me know how I can Select/Highlight (I am not going to run any attribute query against the layer and this is just for visualization) all features listed under one specific Group layer?
For example I have a group layer called Streets_line
and many features listed under it.
Can you let me know how I can highlight all of them in Current Map?
I already tried this
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListLayers(mxd, "Streets_line")[0]
for dfs in arcpy.mapping.ListDataFrames(mxd):
for lyr in arcpy.mapping.ListLayers(mxd, "Streets_line", dfs):
arcpy.SelectLayerByAttribute_management (lyr, "NEW_SELECTION", "")
and
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListLayers(mxd, "Streets_line")[0]
for dfs in arcpy.mapping.ListDataFrames(mxd):
for lyr in arcpy.mapping.ListLayers(mxd, "Streets_line", dfs):
arcpy.SelectLayerByAttribute_management (lyr.name, "NEW_SELECTION", "")
but I am getting this error
Runtime error Traceback (most recent call last): File "<string>", line 6, in <module>
File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\management.py", line 7182, in SelectLayerByAttribute
raise e ExecuteError:
ERROR 000840: The value is not a Table View.
ERROR 000840: The value is not a Raster Layer.
ERROR 000840: The value is not a Mosaic Layer.