Sunday, 16 December 2018

arcgis desktop - Trying to use Tkinter to open dialog box in ArcMap


The following script works great from the command line but crashes from the pythonaddin:


import Tkinter

import tkFileDialog
root = Tkinter.Tk()
root.withdraw()
pathtest = tkFileDialog.askopenfilename()

print pathtest

pathtest = pythonaddins.OpenDialog('Open Item', True) does not work for me because it suppresses filetypes that I need to see (pdf).


I know this is a duplicate question but I just joined the site and could not comment on other posts.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...