Error with Iterate Feature Selection in ArcPy

المشرف العام

Administrator
طاقم الإدارة
I tried to select each feature in the layer "temp" and use the selected feature to select features in the other layer "Railway" based on location and then do some calculations with the "Railway" layer using the values in the "temp" layer. Here is the code:

import arcpyfc = "C:/Users/xkuai2/Downloads/temp/temp.shp"cursor = arcpy.SearchCursor(fc)for row in cursor: count = 0 Vol = row.getValue("Volume") arcpy.SelectLayerByAttribute_management("temp", "NEW_SELECTION", "FID" = count) arcpy.SelectLayerByLocation_management("Railway", "WITHIN", "temp", , "NEW_SELECTION") arcpy.CalculateField_management("Railway", "Volume", "[Volume] + Vol", "VB")But I came across with the error message:

Parsing error SyntaxError: invalid syntax (line 5)I checked the code and have no idea what goes wrong.

Still entry level, any help would be appreciated. Thanks!



أكثر...
 
أعلى