Hi all, In my ArcGIS 10.0 & PythonWin 2.6.5, I ran the following ArcPy-Python script:>>> coordList = [[[1, 2], [2, 4], [3, 7]],
... [[6, 8], [5, 7], [7, 2], [9, 5]]]
>>> point = arcpy.Point()
>>> array = arcpy.Array()
>>> featureList = []
>>> for feature in coorList:
... for coordPair in feature:
... point.X = coordPair[0]
... point.Y = coordPair[1]
... array.add(point)
... array.add(array.getObject(0))
... polygon = arcpy.Polygon(array)
... array.removeAll()
... featureList.append(polygon)
... arcpy.CopyFeatures_management(featureList, "c:/TEMP/PythonWin265/polygons2.shp")
Traceback ( File "<interactive input>", line 10
arcpy.CopyFeatures_management(featureList, "c:/TEMP/PythonWin265/polygons2.shp")
^
SyntaxError: invalid syntax
>>> arcpy.CopyFeatures_management(featureList, "C:/TEMP/PythonWin265/polygons.shp")
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 1943, in CopyFeatures
raise e
RuntimeError: Object: Error in executing tool
>>>
I have no ideas what is wrong in my script. Please kindly help and advise me how to fix this problem.Thanks,Scott Chang