Quantcast
Channel: Question and Answer » arcpy
Viewing all articles
Browse latest Browse all 767

Creating Tkinter dialog box in arcpy?

$
0
0

I would like to create a dialog box which pops up when the user click on a button from a Python Add-In toolbar.

The user will navigate to their preferred file and select any shapefiles they wish to add to ArcMap.

I found this code:

    import Tkinter, tkFileDialog
    root = Tkinter.Tk()
    root.withdraw()
    file_path = tkFileDialog.askopenfile()

but the dialog box is ALMOST opening and then ArcMap crashes.


Viewing all articles
Browse latest Browse all 767

Trending Articles