Show Navigation | Hide Navigation
You are here:
Geoprocessing > Automating your work with scripts > Scripting object: Properties and Methods > Properties and Methods

ResetProgressor method

Release 9.3
Last modified January 19, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Properties and Methods"


Related Topics

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



Syntax


object.ResetProgressor()

Part Description
object The instantiated geoprocessing object


Examples




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()



Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.