I have to copy lot of polygons (without attributs) for a shapefile to another in an editing session.
I want to do this with python scripting in python windows (ArcGIS 10.1).
I selected each polygon of interest and now I am doing this work just by Copy/Paste commands?
Some time the copy do not work and I have to repeat this step lot of time (I work on a server).
Can you please help me to figure out this problem?
Thanks
Solved! Go to Solution.
If you just want to copy the shape of selected features in the ArcMap Python window then:
inscursor = arcpy.da.InsertCursor("OutputShapes",("SHAPE@"))
with arcpy.da.SearchCursor("InputData", ["SHAPE@"]) as cursor:
for row in cursor:
inscursor.insertRow((row[0],))
For example:
This will copy just the geometry into the output shapefile.
Hope this helps.
Owen
If you just want to copy the shape of selected features in the ArcMap Python window then:
inscursor = arcpy.da.InsertCursor("OutputShapes",("SHAPE@"))
with arcpy.da.SearchCursor("InputData", ["SHAPE@"]) as cursor:
for row in cursor:
inscursor.insertRow((row[0],))
For example:
This will copy just the geometry into the output shapefile.
Hope this helps.
Owen
Thanks Very much. I will try it and send a comment on this
It work perfectly. Thanks a lot