Search for string in text block in Inventor Drawing.

Search for string in text block in Inventor Drawing.

C_Haines_ENG
Collaborator Collaborator
303 Views
2 Replies
Message 1 of 3

Search for string in text block in Inventor Drawing.

C_Haines_ENG
Collaborator
Collaborator

Hello,

 

I need to look through all text blocks (see image), to seach for a specific string of text. I cant seem to find anything for targeting text blocks.

 

chainesL5H3G_0-1695227165105.png

 

Anyone know how I should go about this?

 

 

0 Likes
Accepted solutions (1)
304 Views
2 Replies
Replies (2)
Message 2 of 3

tfrohe_LSI
Advocate
Advocate
Accepted solution

The "Text" box you are looking for is a "GeneralNote" object. You can loop through them with

 

For Each oNote as GeneralNote in <SHEET>.DrawingNotes.GeneralNotes
    If oNote.FormattedText.Contains("YOUR SEARCH TERMS") Then
        ' Do something
    End If
Next

 Where <SHEET> is your sheet object in code. Substitute your variable there.

0 Likes
Message 3 of 3

C_Haines_ENG
Collaborator
Collaborator

Perfect, thanks!

0 Likes