Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Select features using onRectangle

$
0
0
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.
Code:

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...

Viewing all articles
Browse latest Browse all 2485

Trending Articles