How to check TopSolid.text in $SET_ENTITIES_TEXTS

All topics about specific development with COM interface, LIP language, API in VB, ...

Moderators: remi77, jacs, Daniel

Holzknoten
Master Corporal
Master Corporal
Posts: 43
Joined: Fri Apr 29, 2011 7:16 am
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.17
Location: Hannover
Contact:

How to check TopSolid.text in $SET_ENTITIES_TEXTS

Unread post 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
by Holzknoten
Post Reply