I'm working on a ToolValidation Code (Python) and want to pass a result (values) from the function "updateParameters" to the function "updateMessages". Does anybody has good example how to do that?
Thanks for your idea, but I did not succeed with it. I made now an ugly workaround, but it works for the moment.
Just off the top of my head, you could do something like the following using a python toolbox:
class SomeTool(object): def __init__(self): self.some_variable = None #etc... def getParameterInfo(self): #etc... return params def updateParameters(self, parameters): result = arcpy.ATool_SomeToolbox('somedata') self.some_variable = result.GetOutput(0) def updateMessages(self, parameters): if self.some_variable is not None: #Do something #etc... self.some_variable = None #reset the variable just in case
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.