Hi @shunmuga_maheswaran. We all want the solutions to our Inventor automation/customization challenges to be simple and easy, but unfortunately sometimes no simple or easy solution exists, or at least no one seems to know of one. That is often the case when attempting to modify 'formatted text' in drawing annotations. The manual dialogs for editing them often have tons of controls and settings built into them for helping us edit that type of stuff, but attempting to do the same things by code can be incredibly complex, and require way more code that it seems like it should. If you only wanted to insert a couple special characters in a customized hole note once in a while, we could use the 'Edit Hole Note' dialog and the 'Insert Symbol' control, as seen in the screen captured image below. However, if trying to do that entirely by code, we first need to retrieve the existing value of the 'FormattedHoleThreadNote' property, then edit that very long, complex looking String value by inserting something similar to the following:
"<StyleOverride Font='AIGDT' FontSize='0.254'>n</StyleOverride>"
...in the correct location(s), to insert the diameter symbol. The 'Font' portion of that is obviously important, but the 'FontSize' spec is usually filled in based on the current/active DimensionStyle for that specific scenario of a HoleThreadNote, unless modified directly within the 'Edit Hole Note' dialog. Some of those placeholder entities within the overall note, even though they may look very short & simple within the 'Edit Hole Note' dialog, there will be far longer and much more complex String within that one property behind the scenes for it, because things like precision, tolerance type, and tolerance precision, and alternate precisions are also being dictated within some of them. This is why often the quickest way to get the exact String value you want to use within an iLogic rule is to do the edits manually, within the dialog, then get the value of that FormattedHoleThreadNote property afterwards, and copy it into the iLogic rule that is supposed to help repeat that step next time. But just like in the 'Styles Editor' dialog when editing those styles for HoleThreadNotes, there is a long scrolling list of possible scenarios to choose from, and each would likely require a different custom formatted text String.
What I often do in situations like that, depending on the scope of the issue and/or how often it is required, is to create one or more alternate DimensionStyles (I have a list of them), where each DimensionStyle has different settings, for different situations. Then whenever needed, either switch to one of the alternate styles before placing a new dimension annotation, or select one or more existing drawing annotations, then choose the alternate style on the Annotate tab's 'Format' panel, to switch them to that style later.
Even if I created a similar looking part, and created a similar looking HoleThreadNote, then captured its formatted text to post here, it would still not be accurate enough for you to use directly, because I may be using different Fonts, FontSizes, Units, Precision, Tolerances, Tolerance Precision, Alternate Precision/Tolerance settings, and so on.

In the example code I posted in Message 7, you could replace the 'Logger' stuff with an 'InputBox' instead. Within the 'inputs' of the InputBox is a parameter named 'DefaultResponse'. You can fill that in with the current value of that 'FormattedHoleThreadNote' property, so that its text will be showing within the selectable & editable TextBox area of that dialog when it shows. Unfortunately, that dialog only allows a single line of text, so it will be really long. It will let you edit its value, either directly within that dialog, or you could select & copy its value into a new/empty Notepad, then edit it, then copy & paste the edited value back into that InputBox. That InputBox can be used to set the value of a String type variable in a rule. Then that String type variable could be set as the new value of that property. Just throwing some ideas out there trying to help.
Wesley Crihfield

(Not an Autodesk Employee)