I'm programming a python toolbox (*.pyt) and want to display a progressbar in arcgis 10.3. I'm using the same piece of code as this one, but I can't see the same dialog box as above. I can only see the messages updating in the geoprocessing "results" window. I also tried to add my Pyt to the toolbox window, but this didn't solve this issue.
Is this progressor class only working for python script, and not for python toolbox ?
1 Answer 1
To see the progress dialog as seen in the linked Q&A you need to have self.canRunInBackground = False
set in your PYT code. This will force your tool to run in the foreground with that dialog showing.
See Defining a tool in a Python toolbox
class CalculateSinuosity(object):
def __init__(self):
self.label = "Calculate Sinuosity"
self.description = "Sinuosity measures the amount that a river meanders within its valley, " + \
"calculated by dividing total stream length by valley length."
self.canRunInBackground = False
Explore related questions
See similar questions with these tags.
canRunInBackground
?