Тема: Поиск текста в области

Может кто знает: есть область (Хmin, Ymin; Xmax, Ymax). Надо узнать есть ли в этой области текст и если есть - прочесть его.
На VBA или Lisp.

Re: Поиск текста в области

Sozday command list na danoe okno. If premetiv=Text, vivedi na ecran znachenia texta. Kak cozdati command List, esche ne znau.Tolko vzslas.

Re: Поиск текста в области

Sub TextFound()
    Dim ssetObj As AcadSelectionSet
    Dim text As AcadText
    Dim corner1(0 To 2) As Double
    Dim corner2(0 To 2) As Double
    corner1(0) = Xmin
    corner1(1) = Ymin
    corner1(2) = 0
    corner2(0) = Xmax
    corner2(1) = Ymax
    corner2(2) = 0
    Dim gpCode(0) As Integer
    Dim dataValue(0) As Variant
    gpCode(0) = 0
    dataValue(0) = "TEXT"
    Dim groupCode As Variant, dataCode As Variant
    Dim mode As Integer
    mode = acSelectionSetCrossing
    groupCode = gpCode
    dataCode = dataValue
    Set ssetObj = ThisDrawing.ActiveSelectionSet
    ssetObj.Select mode, corner1, corner2, groupCode, dataCode
    If (ssetObj.Count > 0) Then
        For Each text In ssetObj
            MsgBox text.TextString
        Next text
    Else
            MsgBox "Text not found"
    End If
End Sub