Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

no line break in DrawingNote.Text

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
AdamAG99T
938 Views, 5 Replies

no line break in DrawingNote.Text

I'm writing some code that is attempting to edit the text in an existing DrawingNote, but it appears that using DrawingNote.Text completely removes any line breaks. Is there any possible workaround that allows me to replace a few characters in the text of a DrawingNote without having the line breaks removed?

5 REPLIES 5
Message 2 of 6

Hi, check if this code can help you, change a word within the general note, do not delete the jumps, just replace it.
I hope it is useful for you. regards

 

oDoc = ThisDoc.Document

Dim TXT2Find As String
Dim NewTXT As String

'get user input
TXT2Find = InputBox("Enter Text To Find:", "iLogic", "XXX")
'look for blank value
If TXT2Find ="" Then
Return 'exit rule
Else 
'Continue rule
End If

NewTXT = InputBox("Enter Text To Replace   '"& TXT2Find _ 
& "'  with.", "iLogic", "****")

For Each oSheet  As Sheet In oDoc.Sheets
    'look at gerenal notes
    For Each oGeneralNote  As GeneralNote In  oSheet.DrawingNotes.GeneralNotes
		On Error Resume Next
		oGeneralNote.FormattedText = Replace( oGeneralNote.FormattedText , TXT2Find , NewTXT )    
    Next 
Next

 


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

Message 3 of 6

what is a General Note ? I'm just looking around to leard new stuff.  hope you have time to tell me

Tags (1)
Message 4 of 6


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

Message 5 of 6

Thanks. I think I understand it now

Message 6 of 6

Hello Sergio, you're great. That's what I thought, six months ago. You had to come to make it happen. Thank you. Sergio, you're very good. If you solve this you will be the best .-))) What do you think is a good idea? Is it Real for Autodesk? https://forums.autodesk.com/t5/inventor-ideas/new-bill-of-materials/idi-p/8358449

Just as a point of interest. Attached, the most interesting topics from around Ideas.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report