vegprincess

Model exported to python won't run - Includes IterateFieldValues and FC to FC

Discussion created by vegprincess on May 24, 2011
Latest reply on Jun 28, 2011 by JScheirer-esristaff
I created three models and exported them to python hoping that I could create a batch file to auto-run them in sequence.  The first two are fine and work without a problem.  The third works properly as a model in ArcView but once exported as python script, won't run.  I haven't changed it at all and even tried re-exporting just in case.  (Well, it might be running but it's not producing anything.)  Any suggestions?  Is it possible that Iterate Field Values won't work outside of Arc?

# Import arcpy module
import arcpy

# Load required toolboxes
arcpy.ImportToolbox("Model Functions")

# Local variables:
ProcessArea = "M:\\GISData\\CFNData\\FiberRoutes\\FiberSource\\ProcessArea"
tblRouteSegments = "C:\\GISData\\FiberRoutes.mdb\\tblRouteSegments"
tblActivePublicProviderList = "C:\\GISData\\FiberRoutes.mdb\\tblActivePublicProviderList"
Value = "1.shp"

# Process: Iterate Field Values
arcpy.IterateFieldValues_mb(tblActivePublicProviderList, "ProviderID", "String", "true", "true", "")

# Process: Feature Class to Feature Class
arcpy.FeatureClassToFeatureClass_conversion(tblRouteSegments, ProcessArea, Value, [FieldMap...], "")

Outcomes