I am learning the usage of SetProgressor. I used the sample code from ArcGIS guide to test, as shown below.
import os
import arcpy
# Allow overwriting of output
arcpy.env.overwriteOutput = True
# Set current workspace
arcpy.env.workspace = r'E:\OilWells Model 20161010\test3\EachRoute'
# Get a list of shapefiles in folder
fcs = arcpy.ListFeatureClasses()
# Find the total count of shapefiles in list
fc_count = len(fcs)
# Set the progressor
arcpy.SetProgressor("step", "Copying shapefiles to geodatabase...",
0, fc_count, 1)
# Create a file gdb to contain new feature classes
arcpy.CreateFileGDB_management(arcpy.env.workspace, "fgdb.gdb")
# For each shapefile, copy to a file geodatabase
for shp in fcs:
# Trim the '.shp' extension
fc = os.path.splitext(shp)[0]
# Update the progressor label for current shapefile
arcpy.SetProgressorLabel("Loading {0}...".format(shp))
# Copy the data
arcpy.CopyFeatures_management(shp, os.path.join("fgdb.gdb", fc))
# Update the progressor position
arcpy.SetProgressorPosition()
arcpy.ResetProgressor()
When I run the above code in the built-in python shell of ArcGIS, I didn't find the progress bar. Can anyone tell me where is the progress bar showing when run the code?
I am using ArcGIS 10.3.1 Advanced License.