Apr-06-2019, 12:46 PM
Very new to Python and programming in general. I've watched videos and read tutorials about class variables, but I can't get it through my head how to make "selection" from FileType available in coordpick:
Would appreciate some help!
Would appreciate some help!
import arcpy import pythonaddins class FileType(object): """Implementation for pasdamappa_addin.filetype (ComboBox)""" def __init__(self): self.items = [".tif", ".jp2", ".sid"] self.editable = False self.enabled = True def onSelChange(self, selection): coordpick.enabled = True print selection class coordpick(object): """Implementation for pasdamappa_addin.coordpick (Tool)""" def __init__(self): self.enabled = False self.shape = 'NONE' # Can set to "Line", "Circle" or "Rectangle" for interactive shape drawing and to activate the onLine/Polygon/Circle event sinks. def onMouseDownMap(self, x, y, button, shift): print str(x)[:3] + str(y + 10000)[:2] + selection