Message 1 of 4
Text will not change unless it is on the screen

Not applicable
02-13-2009
03:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anybody tell me why this wont change the text unless it is displayed on
the screen?
the screen?
Public Sub cgText()
If OptionButton1.Value = True Then
Dim TxtObj As AcadText
Dim InstPT(0 To 2) As Double
InstPT(0) = 1890: InstPT(1) = 414: InstPT(2) = 0
Dim TxtStr As String
Dim acSelectSet As AcadSelectionSet
Dim acSelectSets As AcadSelectionSets
Set acSelectSets = ThisDrawing.SelectionSets
For Each acSelectSet In acSelectSets
If acSelectSet.Name = "SSET1" Then
acSelectSets.Item("SSET1").Delete
End If
Exit For
Next
Set acSelectSet = acSelectSets.Add("SSET1")
acSelectSet.SelectAtPoint InstPT
For Each TxtObj In acSelectSet
TxtObj.TextString = Label1.Caption
Next
acSelectSet.Delete
End If
If OptionButton2.Value = True Then
InstPT(0) = 1890: InstPT(1) = 414: InstPT(2) = 0
Set acSelectSets = ThisDrawing.SelectionSets
For Each acSelectSet In acSelectSets
If acSelectSet.Name = "SSET1" Then
acSelectSets.Item("SSET1").Delete
End If
Exit For
Next
Set acSelectSet = acSelectSets.Add("SSET1")
acSelectSet.SelectAtPoint InstPT
For Each TxtObj In acSelectSet
TxtObj.TextString = Label2.Caption
Next
acSelectSet.Delete
End If
End Sub