Try this...
Sub TextNodeTest() Const Start As String = "Start" Dim oNode As TextNodeElement Set oNode = Application.CreateTextNodeElement2(Nothing, Application.Point3dZero, Application.Matrix3dIdentity, True) oNode.AddTextLine Start ' Write from memory to the element cache Application.ActiveModelReference.AddElement oNode Dim nLines As Long nLines = oNode.TextLinesCount Dim n As Long For n = 1 To nLines If oNode.TextLine(n) = Start Then oNode.TextLine(n) = "test" End If Next n oNode.Rewrite End Sub