# Clear selections on the MAPPING_EXTENTS and TOWNS layers in each data frame # This code could be modified to clear selections on every layer in every data frame dfCount = 0 for df in arcpy.mapping.ListDataFrames(mxd): dfCount += 1 for dfIndex in range(dfCount): df = arcpy.mapping.ListDataFrames(mxd)[dfIndex] clearLyrs = ["MAPPING_EXTENTS", "TOWNS"] for clearLyr in clearLyrs: lyr = arcpy.mapping.ListLayers(mxd, clearLyr, df)[0] arcpy.SelectLayerByAttribute_management(lyr, "CLEAR_SELECTION")
Amanda,
You may have figured this out already.
In Geoprocessing options, change the notification time (it's a bar) to 0, you'll not see the popup window any more, but you may not know your processing is done.
Hope this helps.
Lang
Could I use this code to find and unselected selected features that have a value (not null) in a certain attribute? How would I modify it to do that? Thanks
Doug