2

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 ?

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked May 15, 2017 at 13:33
2
  • 1
    What value is this setting in your PYT : canRunInBackground ? Commented May 15, 2017 at 13:50
  • 1
    Welcome to GIS SE! Thank you for taking the new user tour. I have added a brief answer explaining how to display that progress dialog, however it's hard to offer any more help without seeing some test code. Please edit your question to include a test PYT as text (not an image) of what you've tried. Commented May 15, 2017 at 13:55

1 Answer 1

4

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
answered May 15, 2017 at 13:52
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.