I see this was posted over a month ago, but here is what I would do:Add a new field (number)and populate with an incremental number 1,2,3, etc... using:Static rec As Long Dim pStart As Long Dim pInterval As Long ' adjust start value if you want it to ' start at a value other than 1. ' For example, 1000. ' ==================================== pStart = 1 ' adjust interval value if you want it to ' increment at a value other than 1. ' For example, 2. ' ======================================= pInterval = 1 If (rec = 0) Then rec = pStart Else rec = rec + pInterval End If __esri_field_calculator_splitter__ recThen run this script in python: #import modules import arcgisscripting # Create geoprocessor object gp = arcgisscripting.create (9.3) gp.overwriteoutput = True gp.Workspace = r"C:\...location of points and output points" # Access parameters Points = name of points feature class #where n is the total number of points in the feature class +1 #where number is the name of the field you added above for i in range(1,n,1): gp.Select_analysis (Points, "Output" + str(i), '"number" = ' + str(i))
Static rec As Long Dim pStart As Long Dim pInterval As Long ' adjust start value if you want it to ' start at a value other than 1. ' For example, 1000. ' ==================================== pStart = 1 ' adjust interval value if you want it to ' increment at a value other than 1. ' For example, 2. ' ======================================= pInterval = 1 If (rec = 0) Then rec = pStart Else rec = rec + pInterval End If __esri_field_calculator_splitter__ rec
#import modules import arcgisscripting # Create geoprocessor object gp = arcgisscripting.create (9.3) gp.overwriteoutput = True gp.Workspace = r"C:\...location of points and output points" # Access parameters Points = name of points feature class #where n is the total number of points in the feature class +1 #where number is the name of the field you added above for i in range(1,n,1): gp.Select_analysis (Points, "Output" + str(i), '"number" = ' + str(i))
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.