All,
Is there an efficient way to select multiple features in a feature class using a Python list containing OIDs of the features?
What I have set up right now is the following:
for OID in OIDlist:
query = 'OID = ' + OID
gp.SelectByAttribute(layername, "ADD_TO_SELECTION", query)
That works, however it is painfully slow. Is there another approach that I can use (possibly avoiding the GP SelectByAttributes tool?) that would be more efficient?
My desired end result is a layer file that only contains the features with OIDs specified in the list.
Thanks in advance.