ResetProgressor method |
|
Release 9.3
Last modified January 19, 2010 |
![]() ![]() ![]() Print all topics in : "Properties and Methods" |
Note:
This topic was updated for 9.3.1.
Resets the progressor to its initial settings
For use with script tools
NOTE: Supported only when the geoprocessor is instantiated using the arcgisscripting module; not supported when using the win32com module. Learn more about creating the geoprocessor object
Part | Description |
object | The instantiated geoprocessing object |
import arcgisscripting gp = arcgisscripting.create(9.3) # Allow overwriting of output # gp.OverWriteOutput = 1 # Set current workspace # gp.Workspace = "c:/temp" # Get a list of shapefiles in folder # fcs = gp.ListFeatureClasses() # Find the total count of shapefiles in list # fcCount = len(fcs) # Set the progressor # gp.SetProgressor("step", "Copying shapefiles to geodatabase...", 0, fcCount, 1) # Create a file gdb to contain new feature classes # gp.CreateFileGDB(gp.workspace, "fgdb.gdb") # For each shapefile, copy to a file geodatabase # for shp in fcs: # Strip the '.shp' extension # fc = shp.rstrip(".shp") # Update the progressor label for current shapefile # gp.SetProgressorLabel("Loading " + shp + "...") # Copy the data # gp.CopyFeatures(shp, "fgdb.gdb/" + fc) # Update the progressor position # gp.SetProgressorPosition() gp.ResetProgressor()