Frequently asked question
Note:
Using Next() and Reset() with List methods produces an error only if the script uses the 9.3 version of the arcgisscripting module.
Current scripts that utilize the 9.2 version are not effected.
Code:
import arcgisscripting
gp = arcgisscripting.create()
gp.workspace = r"D:\Data"
fcS = gp.ListFeatureClasses()
fc = fcS.Next()
while fc:
print fc
fc = fcS.Next()
Code:
import arcgisscripting
gp = arcgisscripting.create(9.3)
gp.workspace = r"D:\Data"
fcS = gp.ListFeatureClasses()
for fc in fcS:
print fc
Get help from ArcGIS experts
Download the Esri Support App