I created a addin from python addin wizard with many menus and buttons. For one of these buttons I want to open a Python (.py) script from my Toolbox. I tried many ways but no one works. I want this because this script open the parameter dialog box with some parameters to input. I really need to open the windows to put the parameters.
class ConfereChave(object):
"""Implementation for ConfereChave.button (Button)"""
def __init__(self):
self.enabled = True
self.checked = False
def onClick(self):
pythonaddins.MessageBox('Text', 'Confere Chave', 0)
relPath = os.path.dirname(r'F:')
TBX = relPath + r"\Agro\Agro.tbx"
pythonaddins.GPToolDialog(r'F:\Agro\Agro.tbx', 'ConfereChave')
I get this error:
Executing: ConfereChave F:\AgroBD.gdb\IBGE\Brasil_Municipios Alfabetico
COD_IBGE teste1 Float
Start Time: Fri Jul 21 00:31:52 2017
ERROR 000576: Script associated with this tool does not exist.
Failed to execute (ConfereChave).
Failed at Fri Jul 21 00:31:53 2017 (Elapsed Time: 0,69 seconds)
I already put the relative path but do not work too.
Code updated but do not work, the same error remains.Remember CampoConfere is a python script (py)