How to check TopSolid.text in $SET_ENTITIES_TEXTS

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

Moderators: remi77, Daniel, jacs

Post Reply
Holzknoten
Master Corporal
Master Corporal
Posts: 34
Joined: Fri Apr 29, 2011 7:16 am
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.14
Location: Münster

How to check TopSolid.text in $SET_ENTITIES_TEXTS

Post by Holzknoten » Fri Jan 06, 2017 7:40 am

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

Who is online

Users browsing this forum: No registered users and 2 guests