Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [Connect update 4 VBA] Text Node problem

$
0
0

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

Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>