Hello
In ArcGis Desktop I can create a dialog box using Python and Tkinter.
Can I do something similar in ArcGis Pro?
Apparently I can't use Tkinter in ArcGis Pro, I can't import it, but is there an equivalent alternative?
ArcGIS Pro uses Python 3.X (ArcMap uses 2.7.X I think). TKinter was renamed to tkinter.
You could try using that. In my experience, Pro and Python guis don't play very well together. Save your work before you try, there's a good chance Pro will crash or freeze.
I belive the way to do something like that would be writing your own AddIn.
But that seems like a lot of hassle for a simple dialog window.
For a simple message box, something like this could suffice:
import webbrowser def open_dialog_box(message): path = "H:/dialog_box.txt" # some location you have write access to with open(path, "w") as f: f.write(message) webbrowser.open(path) open_dialog_box("Hey there!")
Thanks, this works!!!I have to study the addins
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.