<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Highlight Holecallouts that contain regular text in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9982013#M119658</link>
    <description>&lt;P&gt;Afternoon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if anyone could help me with some short code that would when run within a drawing highlight hole callouts which contain regular text, (indicating that someone has potentially manually entered the hole text) as a quick means to checking if hole callouts are pure hole callouts or not. ideally i would like the highlight to only be on the text not the entirety of the holecallout.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have found something similar to what i would like to acheive on inventor trenches blog which will highlight over ridden dimensions. link below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://inventortrenches.blogspot.com/2011/06/using-ilogic-to-find-dimension.html" target="_blank"&gt;https://inventortrenches.blogspot.com/2011/06/using-ilogic-to-find-dimension.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jan 2021 14:17:27 GMT</pubDate>
    <dc:creator>jamieking89</dc:creator>
    <dc:date>2021-01-06T14:17:27Z</dc:date>
    <item>
      <title>Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9982013#M119658</link>
      <description>&lt;P&gt;Afternoon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if anyone could help me with some short code that would when run within a drawing highlight hole callouts which contain regular text, (indicating that someone has potentially manually entered the hole text) as a quick means to checking if hole callouts are pure hole callouts or not. ideally i would like the highlight to only be on the text not the entirety of the holecallout.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have found something similar to what i would like to acheive on inventor trenches blog which will highlight over ridden dimensions. link below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://inventortrenches.blogspot.com/2011/06/using-ilogic-to-find-dimension.html" target="_blank"&gt;https://inventortrenches.blogspot.com/2011/06/using-ilogic-to-find-dimension.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 14:17:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9982013#M119658</guid>
      <dc:creator>jamieking89</dc:creator>
      <dc:date>2021-01-06T14:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9982276#M119661</link>
      <description>&lt;P&gt;See if this works for you.&amp;nbsp; It follows the same idea, but gets the hole notes instead.&amp;nbsp; They would have to have been made as HoleThreadNotes using the designated "Hole and Thread" tool on the Annotate tab &amp;gt; Feature Notes panel, for this to work.&amp;nbsp; If they are just regular leader notes or regular dimensions, we would need to include a lot more code to check those types of things too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
	MsgBox("A Drawing Document must be active for this rule (" &amp;amp; iLogicVb.RuleName &amp;amp; ") to work. Exiting.",vbOKOnly+vbCritical, "WRONG DOCUMENT TYPE")
	Exit Sub
End If
Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oTO As TransientObjects = ThisApplication.TransientObjects
Dim oColor As Color

oAns = MsgBox("Highlight [Yes] or UnHighlight [No]", vbYesNo + vbQuestion, "")
If oAns = vbYes Then
	oColor = oTO.CreateColor(255, 0, 255)
Else
	oColor = oTO.CreateColor(0, 0, 0)
	oColor.ColorSourceType = ColorSourceTypeEnum.kLayerColorSource
End If

Dim oHoleNotes As Inventor.HoleThreadNotes = oSheet.DrawingNotes.HoleThreadNotes
If oHoleNotes.Count &amp;gt; 0 Then
	For Each oHN As HoleThreadNote In oHoleNotes
		If oHN.ModelValueOverridden Then
			oHN.Text.Color = oColor
		End If
	Next
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE' &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;If you have time, please... Vote For &lt;A href="https://forums.autodesk.com/t5/forums/recentpostspage/post-type/message/interaction-style/idea/user-id/7812054/" target="_blank" rel="noopener"&gt;My IDEAS &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B166FEBB95D67CFA84899D32D8E17FC1/emoticons/1f4a1.png" alt=":light_bulb:" title=":light_bulb:" /&gt;&lt;/SPAN&gt;&lt;/A&gt;and Explore &lt;A href="https://knowledge.autodesk.com/profile/LTSUSR7HXMSAE/articles" target="_blank" rel="noopener"&gt;My CONTRIBUTIONS &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/" target="_blank" rel="noopener"&gt;Inventor 2021 Help &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-forum/bd-p/78/" target="_blank" rel="noopener"&gt;Inventor Forum &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-customization/bd-p/120/" target="_blank" rel="noopener"&gt;Inventor Customization Forum &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/idb-p/v1232/" target="_blank" rel="noopener"&gt;Inventor Ideas Forum &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 15:55:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9982276#M119661</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-01-06T15:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9982311#M119662</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;thanks for the quick response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes that is how i would like it to work, with regards to the hole and thread callout in annotate &amp;gt; feature notes and then hole and thread however when i run the code it doesnt seem to highlight any text?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this with only hole designations, with only text and a mixture of the two. This was as you said using the hole and thread callout and not a leader or regular text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers again&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 16:08:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9982311#M119662</guid>
      <dc:creator>jamieking89</dc:creator>
      <dc:date>2021-01-06T16:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9982412#M119664</link>
      <description>&lt;P&gt;Yes.&amp;nbsp; HoleThreadNotes are a bit odd, and have a lot of options, that can be set-up within their Styles and depending on the application and what they are attached to.&amp;nbsp; They are rarely actually overridden, in a way that is easily detectable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I think we may have to use some custom string contents searching to be more accurate for this purpose. One thing we can do is check its FormattedHoleThreadNote to see if it contains the expected "&amp;lt;" and "&amp;gt;" symbols, because it uses XML formatting within it.&amp;nbsp; If it doesn't contain one (or either) of these symbols, it has definitely been manually edited, in a way that has over written the default contents.&amp;nbsp; The default contents are always references to existing data, such as Parameters, surrounded by those symbols, so that it places the 'linked' values in their place within the final output text that you see.&amp;nbsp; However if the user has left some of this default formatting and only replaced parts of it, then some of those symbols may still exist within the formatted text and this check will fail to find it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One other check we can do is check to see if its value has been hidden.&amp;nbsp; This is an odd situation, but possible.&amp;nbsp; If you right click on one then select "Hide Value", then you right click it again and use "Text...", you can type in whatever you want it to show that way too.&amp;nbsp; When you choose "Text..." on a normal (unedited) note, it will show a "Format Text" dialog, in which only shows "&amp;lt;&amp;lt;&amp;gt;&amp;gt;".&amp;nbsp; That "&amp;lt;&amp;lt;&amp;gt;&amp;gt;" is where the normal formatted text is inserted.&amp;nbsp; Then you can type something in either before or after that symbol, and it will show either before or after the usual note contents.&amp;nbsp; But after you've hidden the notes value, that "&amp;lt;&amp;lt;&amp;gt;&amp;gt;" symbol is no longer in there, so what you type in there will be the only thing that shows.&lt;/P&gt;&lt;P&gt;Here's the updated code:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
	MsgBox("A Drawing Document must be active for this rule (" &amp;amp; iLogicVb.RuleName &amp;amp; ") to work. Exiting.",vbOKOnly+vbCritical, "WRONG DOCUMENT TYPE")
	Exit Sub
End If
Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oTO As TransientObjects = ThisApplication.TransientObjects
Dim oColor As Color

oAns = MsgBox("Highlight [Yes] or UnHighlight [No]", vbYesNo + vbQuestion, "")
If oAns = vbYes Then
	oColor = oTO.CreateColor(255, 0, 255)
Else
	oColor = oTO.CreateColor(0, 0, 0)
	oColor.ColorSourceType = ColorSourceTypeEnum.kLayerColorSource
End If

Dim oHoleNotes As Inventor.HoleThreadNotes = oSheet.DrawingNotes.HoleThreadNotes
If oHoleNotes.Count &amp;gt; 0 Then
	For Each oHN As HoleThreadNote In oHoleNotes
		If oHN.ModelValueOverridden Or _
			oHN.FormattedHoleThreadNote.Contains("&amp;lt;") = False Or _
			oHN.HideValue = True Then
			oHN.Text.Color = oColor
		End If
	Next
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;You may have some other ideas unique you your usual documentation style too, that you may have to add in there to catch the trickier edits.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE' &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 16:40:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9982412#M119664</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-01-06T16:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9984064#M119684</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;again thanks for the help. yeh i think this is the reason behind the rule not working as intended, as you have stated the word thread is still classed as text although it is inside of&amp;nbsp; &amp;lt;&amp;gt; but i would like to only highlight the "manually typed" text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would there be a way of checking if text is not inside of &amp;lt;&amp;gt; then highlight it as magenta? Or are there too many possible variants to cover in a rule? Perhaps highlight all text, then check if text is within &amp;lt;&amp;gt; and unhighlight that text?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my situation the problems i have come across the hole callout in a sense has been used as a glorified text box, with all default parameters deleted and the type manually typed in (i have no idea why you would do this anyway). Not sure if that would be classed as hidden as a dimension value&amp;nbsp;could be hidden?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see attached screenshot as an example of the text i would like to be highlighted if running the rule. (second line (M10 x 1.30 - 6H)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="holecallout.png" style="width: 558px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/863361i032EE123C5FFF2D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="holecallout.png" alt="holecallout.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;again many thanks for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 09:37:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9984064#M119684</guid>
      <dc:creator>jamieking89</dc:creator>
      <dc:date>2021-01-07T09:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9984909#M119702</link>
      <description>&lt;P&gt;After looking into your latest request further, I have determined that highlighting just that portion of the FormattedText is not going to be possible at this time.&amp;nbsp; The 'HoleThreadNote.Text' is a 'DimensionText' type object, and that is why we are able to change its color.&amp;nbsp; You can't change the color of a whole or partial String object, because it is just a data type.&amp;nbsp; And the text within the HoleThreadNote.FormattedHoleThreadNote is a string.&amp;nbsp; The 'formatting' within this string is controlled using XML tags.&amp;nbsp;&amp;nbsp; XML is a data handling programming language, and wasn't really designed for showy stuff like HTML is.&amp;nbsp; I can change the Font, FontSize, Bold, Italic, and Underline of text within it, but I don't know of any options to change font color.&amp;nbsp; Here is the main &lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-915B75BA-4696-4fc7-A2C6-54B2BACDE7E1" target="_blank" rel="noopener"&gt;reference for working with XML tags in Inventor's FormattedText&lt;/A&gt; applications.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can however, within the&amp;nbsp;HoleThreadNote.FormattedHoleThreadNote:&lt;/P&gt;&lt;P&gt;- find which ones have some text before the first "&amp;lt;" character, and what that text is&lt;/P&gt;&lt;P&gt;- find which ones have some text after the last "&amp;gt;" character, and what that text is&lt;/P&gt;&lt;P&gt;- I don't know of any 'default' hole callouts that use text after the last "&amp;gt;" character, but many of them use a symbol before the first "&amp;lt;" character, so even this check may not be that simple, if we were able to use it at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems your best bet is still going to be either highlighting all the text or using an actual HighlightSet to actually highlight (not just change the permanent color of) these HoleThreadNote objects, just to point them out.&amp;nbsp; Once you know something is possibly off about them, you can manually look into them.&amp;nbsp; It should still save you a little time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE' &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 15:40:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9984909#M119702</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-01-07T15:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9984986#M119703</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes thats what i was struggling with also, using the HoleThreadNote.Text object but having it determine what is a parameter and what is just plain text. Wasnt sure if there was some form of string identifier for both the parameters and plain text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You mentioned not being able to change the colour but be able to change font styles such as underline, would that be for the entire hole callout as a means to highlight each one used in the drawing or to identify text?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-find which ones have some text after the last "&amp;gt;" character, and what that text is (if we could use this to then highlight/underline/identify of some sort the text after this this could potentially be a fix for me? for myself text after &amp;gt; also wouldnt be used however it is if someone is to manually type into the thread callout which is what i hope to identify. so that might potentially work also)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case i dont think highlighting all of them regardless of if they are correct or not would be much use, if that is the only solution i think i will just continue ot manully check each one by one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again many thanks for your input, much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 16:02:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9984986#M119703</guid>
      <dc:creator>jamieking89</dc:creator>
      <dc:date>2021-01-07T16:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9987528#M119727</link>
      <description>&lt;P&gt;I have something that it seems to me should work, but it still isn't working right for me yet.&amp;nbsp; I am able find and isolate the trailing text after the last "&amp;gt;" character in the formatted text.&amp;nbsp; But all my attempts to change the formatting for just that portion of the formatted text have failed so far, for some reason.&lt;/P&gt;&lt;P&gt;What I have found is that it is adding the extra text (formatting specifications) that I specify to the formatted text of the hole note, but so far it doesn't seem to be having any visible effect on what is being shown.&lt;/P&gt;&lt;P&gt;I've included several comments throughout the code, to help explain what's going on.&lt;/P&gt;&lt;P&gt;Here's what I've got so far:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
	MsgBox("A Drawing Document must be active for this rule (" &amp;amp; iLogicVb.RuleName &amp;amp; ") to work. Exiting.",vbOKOnly+vbCritical, "WRONG DOCUMENT TYPE")
	Exit Sub
End If
Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oHoleNotes As HoleThreadNotes = oSheet.DrawingNotes.HoleThreadNotes
Dim oHN As HoleThreadNote
Dim oStr, oEndText, oOtherText, oNewEndText As String
Dim oEndPos As Integer
If oHoleNotes.Count &amp;gt; 0 Then
	For Each oHN In oHoleNotes
		oStr = oHN.FormattedHoleThreadNote
'		MsgBox(oStr,,"")
		
'		Dim oPos1 As Integer = InStr(oStr, "&amp;lt;", vbTextCompare)
'		If oPos1 &amp;gt; 1 Then
'			'The "&amp;lt;" symbol is not the first character in the string
'			'so we can capture and highlight any text before that position
'			Dim oStartText As String = oStr.Split("&amp;lt;").First
'		End If

		'check if there is any text after the last "&amp;gt;" character
		'this counts characters from end until it finds that character
		oEndPos = InStr(StrReverse(oStr), "&amp;gt;")
		If oEndPos &amp;gt; 1 Then
			'There is more text after the last "&amp;gt;" character in the string
			'this splits the string into an array of sub-strings, divided by that symbol
			'then gets the last sub-string in that resulting array (this works)
			oEndText = oStr.Split("&amp;gt;").Last
			'isolating the rest of the formatted text, without that last part, so it can be formatted seperately
			'this doesn't modify the original, just get data from it
			oOtherText = oStr.Replace(oEndText, "") '(this works too)
			'create a replacement for that oEndText, that contains the special formatting
			oNewEndText = "&amp;lt;StyleOverride Bold='True' Underline='True'&amp;gt;" &amp;amp; oEndText &amp;amp; "&amp;lt;/StyleOverride&amp;gt;"
			'set the new value of the target hole note's formatted text
			oHN.FormattedHoleThreadNote = oOtherText &amp;amp; oNewEndText
		End If
	Next
End If&lt;/LI-CODE&gt;&lt;P&gt;Although I have worked with FormattedText in similar ways before, I don't really consider myself to be a 'guru' in XML at this time.&amp;nbsp; Maybe someone else can see what mistake I may be making in my formatting statement/text, or if what I'm trying to do here just is not possible, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE' &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 14:44:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/9987528#M119727</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-01-08T14:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/10000583#M119941</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again thanks for your help. Do you think that this is not really possible then due too the range of differences being too large or inventor lacks the ability to highlight or indicate in some form the trailing text after "&amp;gt;"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would there be anyway to rather than highlight the trailing text to just change it to a predefined string value such as "THIS HAS BEEN MANUALLY TYPED"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I shall have a play around with your code provided&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, many thanks for your help&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 08:29:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/10000583#M119941</guid>
      <dc:creator>jamieking89</dc:creator>
      <dc:date>2021-01-14T08:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/10001221#M119951</link>
      <description>&lt;P&gt;OK. That definitely sounds doable.&amp;nbsp; But how about, since it has already been manually edited, and we are about to manually edit it again (in a way), why not preserve the existing text that someone manually added, so you know what it was, then add that suggested note to a new last line of the call-out.&lt;/P&gt;&lt;P&gt;This code will do that:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
	MsgBox("A Drawing Document must be active for this rule (" &amp;amp; iLogicVb.RuleName &amp;amp; ") to work. Exiting.",vbOKOnly+vbCritical, "WRONG DOCUMENT TYPE")
	Exit Sub
End If
Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oHoleNotes As HoleThreadNotes = oSheet.DrawingNotes.HoleThreadNotes
Dim oHN As HoleThreadNote
Dim oStr, oEndText, oOtherText, oNewEndText As String
Dim oEndPos As Integer
If oHoleNotes.Count &amp;gt; 0 Then
	For Each oHN In oHoleNotes
		oStr = oHN.FormattedHoleThreadNote
		oEndPos = InStr(StrReverse(oStr), "&amp;gt;")
		If oEndPos &amp;gt; 1 Then
			'the text you want to put at the end to 'Highlight' it
			Dim oHText As String = "THIS HAS BEEN MANUALLY TYPED"
			oHN.FormattedHoleThreadNote = oStr &amp;amp; "&amp;lt;Br/&amp;gt;" &amp;amp; oHText
		End If
	Next
End If&lt;/LI-CODE&gt;&lt;P&gt;Or if you simply want to remove any/all text after the last "&amp;gt;" character, you could use this:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
	MsgBox("A Drawing Document must be active for this rule (" &amp;amp; iLogicVb.RuleName &amp;amp; ") to work. Exiting.",vbOKOnly+vbCritical, "WRONG DOCUMENT TYPE")
	Exit Sub
End If
Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oHoleNotes As HoleThreadNotes = oSheet.DrawingNotes.HoleThreadNotes
Dim oHN As HoleThreadNote
Dim oStr, oEndText, oOtherText, oNewEndText As String
Dim oEndPos As Integer
If oHoleNotes.Count &amp;gt; 0 Then
	For Each oHN In oHoleNotes
		oStr = oHN.FormattedHoleThreadNote
		If InStr(StrReverse(oStr), "&amp;gt;") &amp;gt; 1 Then
		oHN.FormattedHoleThreadNote = Left(oStr, InStrRev(oStr, "&amp;gt;"))
		End If
	Next
End If&lt;/LI-CODE&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE' &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 13:56:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/10001221#M119951</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-01-14T13:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/10001499#M119954</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is great. Definately something i can use. I have 2 questions though, if my hole callout has "THRU" as default the rule wont pick up on this text (this is good) however it wont pick up on any text after either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rule doesnt pick up on the text after THRU" style="width: 710px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/866333i0865E31F91676986/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="Rule doesnt pick up on the text after THRU" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Rule doesnt pick up on the text after THRU&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also if the rule is run twice without the hole callout being corrected it will add THIS HAS BEEN MANUALLY TYPED twice, and again for each time the rule is run, is there a way to tweak this so if&amp;nbsp; the warning message has already been included it wont typed it multiple times? Also this effects the rule which will clear the text, if there are 2 lines of THIS HAS BEEN MANUALLY typed it will only get rid of the last line and if the rule is run again wont delete anymore?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apart from those minor things the rule is great and is exactly what i am looking for, thank you very much for your time and help with this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 15:23:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/10001499#M119954</guid>
      <dc:creator>jamieking89</dc:creator>
      <dc:date>2021-01-14T15:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/10001539#M119956</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is extra but the attached screenshots are for different scenarios im wondering if could also be captured, one being if the text that is over written inside of 2 XML callouts &amp;lt;&amp;gt; TEXT &amp;lt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 548px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/866337i3D20F7C9BE54ADC5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And also if text is embedded inside again but the last line is over written? It spits out alot of XML information if the rule is run and the second rule to delete this text then wont work.&amp;nbsp;Any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 548px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/866339i63C05A51AAB8D871/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/866341iA2436A1CBA9B5DB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.png" alt="4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your input is much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 15:35:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/10001539#M119956</guid>
      <dc:creator>jamieking89</dc:creator>
      <dc:date>2021-01-14T15:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/10001913#M119967</link>
      <description>&lt;P&gt;I see the problem.&amp;nbsp; When you edit the note, using the Edit Hole Note dialog, and you use your [Enter / Return] keyboard key to go to the next line of text (so your cursor is waiting on the next line), it is putting a "&amp;lt;Br/&amp;gt;" ('break line' in XML) at that point into the FormattedText.&amp;nbsp; Then whatever additional text you may or may not type on that new line.&amp;nbsp; My code was getting rid of the text after that additional "&amp;lt;Br/&amp;gt;", but not that last "&amp;lt;Br/&amp;gt;".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; So, it sounds like we need to add some additional checks in there.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;We need to check if "&amp;lt;Br/&amp;gt;" is the last text in the FormattedText, if so, delete it.&lt;/LI&gt;&lt;LI&gt;It sounds like we may need to establish a list of String values that are OK to be at the end.&lt;UL&gt;&lt;LI&gt;"THRU" being one of those String values&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;If there is text after the last "&amp;gt;" character, then also check if there is a "&amp;lt;Br/&amp;gt;" just before it.&lt;UL&gt;&lt;LI&gt;If that is the scenario, delete both? (Because "THRU" will never be right after a "&amp;lt;Br/&amp;gt;", right?)&lt;/LI&gt;&lt;LI&gt;Will there ever be any text after the last "&amp;lt;Br/&amp;gt;" that is not a 'manual entry'?&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As for the 'extra' requests, it seems to me that there are too many possibilities for regular text being between other legitimate "&amp;lt;...&amp;gt;" links within this FormattedText.&amp;nbsp; If you go into your Style and Standard Editor dialog, then select any of your Dimension styles, then select the Notes and Leaders tab (on the far right), then make sure the radio button for "Hole Note Settings" (top left icon) is selected, then you select the drop-down list (right above the text box) that defaults to "Thru", you will see there is an extremely long list of possible scenarios.&amp;nbsp; And each of those scenarios can potentially be customized.&amp;nbsp; I personally don't want to tackle all those possible scenarios, where there may be legitimate text between two legitimate links in the FormattedText.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 17:36:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/10001913#M119967</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-01-14T17:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight Holecallouts that contain regular text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/10002189#M119972</link>
      <description>&lt;P&gt;What we really need here, to have a perfect inspection tool, is to be able to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Get the hole feature in the model, that this hole is representing&lt;/LI&gt;&lt;LI&gt;Gather the necessary data from it, like:&lt;UL&gt;&lt;LI&gt;simple hole, clearance hole, tapped hole, or taper tapped hole&lt;UL&gt;&lt;LI&gt;if clearance hole:&amp;nbsp; there may be references to 'fastener data'&lt;/LI&gt;&lt;LI&gt;if tapped or taper tapped:&amp;nbsp; there may be&amp;nbsp;references to 'thread data'&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;no seat, couterbore, spotface, or countersink&lt;UL&gt;&lt;LI&gt;if counterbore or spotface:&amp;nbsp; there may be icons and references to the sizes&lt;/LI&gt;&lt;LI&gt;if coutersink:&amp;nbsp; there may be icons and references to the sizes/angles&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Use that data to determine which scenario we are dealing with&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Search within the DimensionStyle of this hole note for what the 'default' note contents for this scenario should be.&lt;UL&gt;&lt;LI&gt;If that were possible.&amp;nbsp; I don't think it is.&lt;/LI&gt;&lt;LI&gt;There is probably an XML file (or 'styxml' or other type of file) where these defaults are stored.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Then compare this hole note's FormattedText to what the default should be&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The only thing I can find within the DimensionStyle by code that sounds any thing like what we're looking for, is the 'DimensionStyle.HoleNoteDualFormat'.&amp;nbsp; But this won't help us any.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 19:12:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/highlight-holecallouts-that-contain-regular-text/m-p/10002189#M119972</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-01-14T19:12:30Z</dc:date>
    </item>
  </channel>
</rss>

