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?
Solved! Go to Solution.
Solved by Sergio.D.Suárez. Go to Solution.
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
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn
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.