Read-Write
TextValue As String
Sets or returns the text for the text alteration.
If you are using a range table to provide strings conditionally, use TextDef.TextValue to reference the range table by supplying a range expression as argument. For more information, click .
The following example shows how to change the text definition in the sample code for altering queried objects. To go to the sample code, click . The sample code sets the text value to the name of the water body. This example changes that text value to the color number of the text. To run the example, add a call to chgtxt just before the call to qry.Define in the sample code, as shown here:
'Call from Altering Queried Objects sample
chgtxt prj, altls
'Define Query
boolVal = qry.Define(mainqrybr)
.
.
.
Sub chgtxt(prj As Project, altls As AlterLines)
Dim i As Integer
Dim altl As Variant
Dim txtdf As TextDef
For i = 0 To prj.CurrQuery.AlterProp.Count - 1
Set altl = altls.Item(i)
If altl.Property = kAlterationTextEntity Then
Set txtdf = altls.Item(i)
txtdf.TextValue = ".COLOR"
End If
Next i
End Sub