I'm doing an arcpy.SelectLayerByAttribute_management and everything is working fine. However I need to know if no records are selected so that I can handle that in my program. If I do something like selCount = arcpy.SelectLayerByAttribute_management.... will that give me the selected count? What if I wanted to iterate through each of the selected features? How would I go about doing that?
The help file contains a link to the GetCount Tool
"The Get Count tool can be used to determine the number of features or rows selected. This can be especially useful in a script or model to determine if further processing is desired."
Thanks Dan. That worked perfectly!
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.