Page 1 of 1

How to check TopSolid.text in $SET_ENTITIES_TEXTS

Posted: Fri Jan 06, 2017 7:40 am
by Holzknoten
Hi everybody,

i try to check and change the Texts inside the Draft.

I got the solution myself. :D :mrgreen: :lol:

My VB Code is now working.

Code: Select all

        Dim ListOfText As TopSolid.Set = TopDoc3D.Elements("$SET_ENTITIES_TEXTS")
        Dim TopElt As TopSolid.Element
        Dim TopText As TopSolid.Text
        For i As Integer = 1 To ListOfText.Elements.Count
            TopElt = ListOfText.Elements.Item(i)
            Try 'because there are not only TEXTs inside "$SET_ENTITIES_TEXTS" also notes are inside.
           	 TopText = TopElt '''''''''''''''''''''''''doesn't working when it is no text
                 If TopText.String = "XX" Then
           	 	TopText.String = "new text"
            	 End If
            Catch ex As Exception
            End Try
        Next