I am trying to pull out a sample out of a geodatabase file. I have 100800 sample and I need to select 28 records, basically every 3600, I am going to start with FID=0 and go from there. Unfortunately I haven't been able to make it work. this is what I have done so far. anyone can give me a hint, it's gonna be a huge help.
import arcpy, sys, os
Input=sys.argv[1]
field=sys.argv[2]
counts=sys.argv[3]
output=sys.argv[4]
def deleteMe(fc):
if arcpy.Exists(fc):
arcpy.Delete_management(fc)
return fc
cursor =arcpy.da.SearchCursor(Input,field)
for row in cursor:
a=row[0]
while row:
x=a+3600
arcpy.MakeFeatureLayer_management(Input, deleteMe("lyr"))
arcpy.SelectLayerByAttribute_management ("lyr", "NEW_SELECTION",a)
#arcpy.SelectLayerByAttribute_management ("lyr", "ADD_TO_SELECTION",x)
arcpy.CopyFeatures_management ("lyr", deleteMe(output))