Select text and set string
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
Here's my problem
I have drawing with 80 views. At bottom of each view there is an text. I want to read text on each view en put it in a string to use it for creating an index.
For now I only be able to select text with ThisDrawing.Utility.GetEntity adEntity, basePnt, "pick text"
But I want to select it with coordinates so I dont have to click on screen. For now I have this but string keeps empty
Dim sstext As AcadSelectionSet
Dim FilterType(3) As Integer
Dim FilterData(3) As Variant
Dim text As String
Dim startPoint(0 To 2) As Double
Dim endPoint(0 To 2) As Double
Set sstext = ThisDrawing.SelectionSets.Add("SS6")
FilterType(0) = -4
FilterData(0) = "<or"
FilterType(1) = 0
FilterData(1) = "TEXT"
FilterType(2) = 0
FilterData(2) = "MTEXT"
FilterType(3) = -4
FilterData(3) = "or>"
sstext.SelectOnScreen FilterType, FilterData
startPoint(0) = 840
startPoint(1) = 3232.5
startPoint(2) = 0#
endPoint(0) = 910#
endPoint(1) = 3225
endPoint(2) = 0#
On Error Resume Next
sstext.Select acSelectionSetWindow, startPoint, endPoint, FilterType, FilterData
text = sstext.textString
Hope somebody can help with this. I have been searching internet for weeks