I'm not seeing a way, through iLogic, to set something that deep within a hole/thread note without either altering the objects Style or altering attempting to alter its FormattedHoleThreadNote text itself. If we edit the object's Style (a dimension style), it will obviously change the local document copy of this objects style permanently. But it might be possible to achieve these very specific changes that way by code.
I'm not even sure it is possible to achieve this by attempting to edit the formatted text, because as you can see in the 'Edit Hole Note' dialog, is only showing one little "<TDDIA>" for the whole {tap drill diameter and its tolerance}, so all we would be able to do is add that "<TDDIA>" into the string, without being able to alter the details of the tolerance itself. Not to mention that it would be a very long and confusing String (text), full of XML code & tags, that will be very difficult to navigate and get all the formatted text just the way you want it. I have worked with some simple formatted text before, but nothing on this scale or level of complexity.
Here is an example iLogic rule you can use that will show you actual code 'behind the scenes' of that note's formatted text, just so you can get a better idea of what we would be dealing with here. I have included some comments to help you decide how you want to use it, and how you prefer to show the results.
If ThisApplication.ActiveDocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then
MsgBox("A Drawing Document must be active for this rule to work. Exiting.",vbOKOnly+vbCritical, "WRONG DOCUMENT TYPE")
Exit Sub
End If
Dim oDDoc As DrawingDocument = ThisApplication.ActiveDocument
'use this line if you prefer to pre-select the hole/thread note
Try
oSelected = oDDoc.SelectSet.Item(1)
Catch
End Try
'or comment above, then uncomment next line to select it after you run the rule
'oSelected = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingDefaultFilter, "Select a Hole Note.")
'check to make sure you selected something and it is the right type of object
If oSelected Is Nothing Or TypeOf oSelected Is HoleThreadNote = False Then
MsgBox("Either Nothing, or wrong object type, was selected. Exiting rule.", , "")
Exit Sub
End If
Dim oHNote As HoleThreadNote = oSelected
'display the contents of the FormattedText
'uncomment the next line to use it if you want
'MsgBox(oHNote.FormattedHoleThreadNote,,"") 'non-selectable, paragraph style display
a = InputBox("","FormattedHoleThreadNote", oHNote.FormattedHoleThreadNote) 'selectable, single line display
That user interface dialog that comes up when you go to edit the hole/thread note is a very advanced tool that is meant to help the user assemble all these reference tags the way they want it, without having to know anything about coding. I honestly don't know of a different way to do what you want by code, without editing the Style being used.
Wesley Crihfield

(Not an Autodesk Employee)