Code: Select all
Annot.GetTextFormat(0)
Code: Select all
Annot.ISetTextFormat(i, True, swTextFormat)
How does one control the format of multi-line notes? GetTextFormat and SetTextFormat only seem to look at the first line of the note.
Code: Select all
Annot.GetTextFormat(0)
Code: Select all
Annot.ISetTextFormat(i, True, swTextFormat)
Thanks, SPerman. I didn't think about paragraphs. It's a bit unclear to me where the separation between 'notes' and 'paragraphs' is.SPerman wrote: ↑Tue Oct 29, 2024 7:41 am You could try treating the multi-line note as a paragraph.
Get and Set Paragraph Properties Example (VBA)
The argument for [Get/Set]TextFormat does not refer to the line. It refers to the piece of text. A multi-line note still only has one piece of text. From the Help for GetTextFormatCount:
Thank you, Josh. That's very helpful and that tool is amazing.josh wrote: ↑Wed Oct 30, 2024 8:40 am Controlling formatting for individual portions of a note is done using SWML. Editing the note formatting using the UI or API calls are really just a way to read and write this SWML. You can use my NoteBrowser macro to read and edit the content of notes and see what the SWML is for certain formats, and you can directly edit or even type this SWML into a note to format it however you want.
This SWML actually works almost anywhere that you can have text, even if you can't use the UI to edit it.
https://www.cadforum.net/viewtopic.php? ... ser#p36380
image.pngimage.png