harrymckenzie

Select features using onRectangle

Discussion created by harrymckenzie on Dec 6, 2012
Latest reply on Dec 6, 2012 by mahunter243
I found an interesting function to use in an add-in called onRectangle. I would like to use this to build a feature set and get values from fields.
def __init__(self):
    self.enabled = True
    self.cursor = 3
    self.shape = 'Rectangle'
    
def onRectangle(self, rectangle_geometry):
    """Occurs when the rectangle is drawn and the mouse button is released.
    The rectangle is a extent object."""

    extent = rectangle_geometry

Now that I have an extent how do I use it to select a feature or features and then get the values from field1, field2, etc...

Outcomes