I am trying to build a model that reads through about 30 different point feature classes and appends only the selected features to a new feature class. Some of the feature classes don't have any selected records, so it is appending every record from that feature class. Is there a way to exclude these features from being appended? In the past we used a VBA macro to read through each feature class and uses selection sets to determine if any of the records are selected, but I can't figure out how to get that same functionality using Python.
If using python (as your tag suggests), and ArcGIS (maybe?), you could do something like this ... (edited)
# Check to be sure there is at least one feature selected. ftrCountBefore = int(arcpy.GetCount_management(layer).getOutput(0)) # ToDo Perform a Selection # ftrCountAfter = int(arcpy.GetCount_management(layer).getOutput(0)) if (not (ftrCountBefore == ftrCountAfter)): doSomething