#prints a list of the selected layers in the TOC along with the number of selected records mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd)[0] for lyr in arcpy.mapping.ListLayers(df): selectedCount = len([int(fid) for fid in arcpy.Describe(lyr).fidset.split(";") if fid != '']) if selectedCount > 0: print "The " + str(lyr) + " layer has " + str(selectedCount) + " records selected..."
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.