I am trying to Duplicate some polygons in the same layer with the same attributes, But it will duplicated them with Null Geometry, i have tried getValue() method, but i got error
import arcpy
polygons_shape="C:\\temp\\FinalLayers.gdb\\FinalLayers\\Polygons"
fields=['ID','Comment','owner']
Insert = arcpy.InsertCursor(polygons_shape)
ID= arcpy.da.SearchCursor(polygons_shape,'*')
for row in ID:
if row[0]>1:
dupCount=row[0]
myShape = row.getValue(shapeName)
insert_row.setValue('ID', row[0])
insert_row.setValue('Comment', row[1])
insert_row.setValue('owner', row[2])
while dupCount>1:
Insert.insertRow(insert_row)
dupCount-=1
The Error:
myShape = row.getValue(shapeName)
AttributeError: 'tuple' object has no attribute 'getValue'
Best Answer
I have FOUND the ANSWER