Select to view content in your preferred language

Bow tie Polygon gives me "Exception from HRESULT: 0x800415A0"

363
0
02-01-2011 09:28 AM
BlaiseMacLean
Deactivated User
The code below works fine if I create a polygon that does not have any intersecting lines.  But if I create a "bowtie" polygon (a polygon that has intersecting lines) then I get an exception on the last line of my code below.

Any guidance is appreciated.

Code:
________________________________________
        Dim polyGeom As IPolygon
        Dim m_RubberBand As IRubberBand
        m_RubberBand = New RubberPolygon()

        If (Args.Button.ToString = "Left") Then
            polyGeom = m_RubberBand.TrackNew(My.ArcMap.Document.ActiveView.ScreenDisplay, Nothing)

            If Not (polyGeom Is Nothing) Then
                Dim bFoundCivicLayer As Boolean = False
                If (polyGeom.IsEmpty = False) Then
                    My.ArcMap.Document.FocusMap.SelectByShape(polyGeom, Nothing, False)
0 Kudos
0 Replies