Here is what I came up with. This code loops through all of the features and inserts them to the new shapefile. If you run it multiple times, it will stack the new features on top of the old ones.import arcgisscripting
gp = arcgisscripting.create(9.3)
gp.overwriteoutput = 1
# set the workspace
gp.workspace = "C:\\Python_Test"
inPolys = "Polygons.shp"
#need the spatial reference for the CreateFeatureClass tool below
dscFC = gp.Describe(inPolys)
sr = dscFC.SpatialReference
newFC = "NewFeatures.shp"
#if the new shapefile doesn't exist it will be created
if not gp.Exists(newFC):
gp.CreateFeatureClass_management(gp.workspace, newFC, "POLYGON", inPolys, "", "", sr)
oldRows = gp.SearchCursor(inPolys)
newRows = gp.InsertCursor(newFC)
oldRow = oldRows.Next()
while oldRow:
#if you need to do anything to the features before they are inserted
#into the new shapefile, this is where you would do it.
newRows.InsertRow(oldRow)
oldRow = oldRows.Next()
del gp, dscFC, sr, oldRows, newRows, oldRow
I hope that helps you out.Jeff Ward
Jeff Ward
Summit County, Utah