toolboxPath = os.path.join(os.path.dirname(__file__), toolboxName + ".pyt")
Also, ensure that the .pyt is in the add-in file. You can check that by renaming the extension .zip and examining the contents.
def onClick(self): # name of toolbox toolboxName = "Condos" # name of tool to be executed (the class in Condos.pyt) toolName = "CondoTool" # create string with path to toolbox relPath = os.path.dirname(__file__) pyt = relPath + os.sep + toolboxName + ".pyt" # call geoprocessing tool pythonaddins.GPToolDialog(pyt, toolName) pass
relPath = os.path.dirname(__file__) pyt = relPath + os.sep + "customToolbox.pyt" pythonaddins.GPToolDialog(pyt, "Tool") # Tool is the class name
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.