Thanks for looking at my question.
I learning Python as I go and have made some headway, so here is what I have now ran into. I have a Python script that creates a menu, I can run it from PyScripter and it all works.
I have created a toolbar using the Python Add-In Wizard that contains a button that will be used to load/run/execute/display the menu.
What I want is to click the button, menu appears, then I work with the selections on the menu to work with the layers.
When I start ArcMap the toolbar is displayed with the button. When I click the button I get a messagebox that I programmed in to make sure it works, one I clear the messagebox I get a quick flash on the screen that I cannot make out, and that is it.
This is the code for the button on the toolbar.
import arcpy
import pythonaddins
import os
class btnOpenMenu(object):
def __init__(self):
self.enabled = True
self.checked = False
def onClick(self):
pythonaddins.MessageBox("Open Menu", "Layer Menu", 0)
os.system('D:\Applications\Python\Open Menu.py')
I also tried: os.system(r'D:\Applications\Python\Open Menu.py') which did not work.
Thanks for your help.