Yes – this can be done in tool eventhandlers. Modify the endExecute event.
def endExecute(self): # use self.name to get this tool instance # Return 1 for OK, 0 for error t=GetTool(self.name) t.visible = (t.getIntValue('Count') >= GetIntValue('Setup.PelletsLimit')) return 1
The tool visible property is True if the Count is high.
Filed under: Python | Leave a comment »