Message 1 of 3
text help

Not applicable
09-24-2004
12:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
the following code works fine if i add a new text what if i choose a
currently created text
Sub Example_TextString()
' This example creates a text object in model space.
' It then returns the text string for that object.
Dim textObj As AcadText
Dim alfa As AcadText
Dim text As String
Dim insertionPoint(0 To 2) As Double
Dim height As Double
Dim a As Variant
' Define the text object
text = "Hello, World."
insertionPoint(0) = 2: insertionPoint(1) = 2: insertionPoint(2) = 0
height = 500
' Create the text object in model space
Set textObj = ThisDrawing.ModelSpace.AddText(text, insertionPoint,
height)
ZoomAll
' Return the current text string for the object
text = textObj.TextString
a = textObj.insertionPoint
Debug.Print a(0)
Debug.Print a(1)
Debug.Print a(2)
end Sub
this works really fine with addtext. what i wanna do is to choose a group of
text with
On Error Resume Next
ThisDrawing.SelectionSets.Item("data").Delete
Set sset = ThisDrawing.SelectionSets.Add("data")
filtertype(0) = 0
filtervalue(0) = "text"
sset.SelectOnScreen filtertype, filtervalue
say = sset.Count
For i = 1 To say - 1
secim = sset.Item(i)
yazi = secim.TextString
'wow again quiet good to get the writen expression of the text. now the best
part. how am i gonna figure the insertion point of that "yazi".
thnx anyway