hi guys
my app code in following. i want to find blockreference in between two points. when i zoom extent working correct. bu i change zoom in autocad result incorrect. i added screenshot. i use SelectCrossingWindow or SelectWindow finally same.


Code:
     Public Sub FindBlockInFrame(frame As Extents3d)

            Dim tvs As TypedValue() = New TypedValue() _
            {
                New TypedValue(DxfCode.Start, "INSERT"),
                New TypedValue(DxfCode.BlockName, "myblock")
            }

            Dim filter As New SelectionFilter(tvs)
            Dim selection As PromptSelectionResult = ed.SelectCrossingWindow(frame.MinPoint, frame.MaxPoint, filter)
            'Dim selection As PromptSelectionResult = ed.SelectWindow(frame.MinPoint, frame.MaxPoint, filter)

            If selection.Status <> PromptStatus.OK Then
                Return
            End If

            Using tr As Transaction = db.TransactionManager.StartTransaction()

                Dim list As New List(Of BlockReference)

                For Each id As ObjectId In selection.Value.GetObjectIds()

                    Dim block As BlockReference = DirectCast(tr.GetObject(id, OpenMode.ForRead), BlockReference)
                    list.Add(block)
                Next

                ed.WriteMessage(vbLf & "block count in frmae  {0})", list.Count)

                tr.Commit()
            End Using
        End Sub

zoom extent:
Ekran Resmi 2017-09-09 12.20.05.jpg

zoom out:
Ekran Resmi 2017-09-09 12.21.00.jpg

zoom out,zoom out,zoom out:
Ekran Resmi 2017-09-09 12.21.54.jpg