<?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 Re: Accessing text properties within a draft view in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-text-properties-within-a-draft-view/m-p/9994170#M119830</link>
    <description>&lt;P&gt;With the formatted text:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Public Sub x()
Dim a As Application
Set a = ThisApplication

Dim b As DrawingDocument
Set b = a.ActiveDocument

Dim c As Sheet
Set c = b.ActiveSheet

Dim d As DrawingView
Set d = c.DrawingViews.Item(2)

Dim dr As DrawingSketch

Set dr = d.Sketches.Item(1)

MsgBox dr.TextBoxes.Count

Dim sb As TextBox
Set sb = dr.TextBoxes.Item(1)

sb.FormattedText = "&amp;lt;StyleOverride Bold='True'&amp;gt;AAA&amp;lt;/StyleOverride&amp;gt;&amp;lt;Br/&amp;gt;BBB&amp;lt;Br/&amp;gt;CCC"

End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jan 2021 21:07:33 GMT</pubDate>
    <dc:creator>bradeneuropeArthur</dc:creator>
    <dc:date>2021-01-11T21:07:33Z</dc:date>
    <item>
      <title>Accessing text properties within a draft view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-text-properties-within-a-draft-view/m-p/9994115#M119826</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i have a draft view that has 49 lines of text, each line is linked to a separate custom i property. Now i want to be able to access the text properties like font, bold etc of each separate line of text within the draft view. I cannot not find any way to find any way to reference those lines of text. There is no names that i can find of them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i want a font override for example to be able to change 1 line of text within a draft view, how would i do that?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 20:41:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-text-properties-within-a-draft-view/m-p/9994115#M119826</guid>
      <dc:creator>AMN3161</dc:creator>
      <dc:date>2021-01-11T20:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing text properties within a draft view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-text-properties-within-a-draft-view/m-p/9994170#M119830</link>
      <description>&lt;P&gt;With the formatted text:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Public Sub x()
Dim a As Application
Set a = ThisApplication

Dim b As DrawingDocument
Set b = a.ActiveDocument

Dim c As Sheet
Set c = b.ActiveSheet

Dim d As DrawingView
Set d = c.DrawingViews.Item(2)

Dim dr As DrawingSketch

Set dr = d.Sketches.Item(1)

MsgBox dr.TextBoxes.Count

Dim sb As TextBox
Set sb = dr.TextBoxes.Item(1)

sb.FormattedText = "&amp;lt;StyleOverride Bold='True'&amp;gt;AAA&amp;lt;/StyleOverride&amp;gt;&amp;lt;Br/&amp;gt;BBB&amp;lt;Br/&amp;gt;CCC"

End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 21:07:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-text-properties-within-a-draft-view/m-p/9994170#M119830</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2021-01-11T21:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing text properties within a draft view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-text-properties-within-a-draft-view/m-p/9995559#M119858</link>
      <description>&lt;P&gt;How do you know which item is which? I think "Item(1) if referencing the text but is it a when they were created that defines what item number they are?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 12:27:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-text-properties-within-a-draft-view/m-p/9995559#M119858</guid>
      <dc:creator>AMN3161</dc:creator>
      <dc:date>2021-01-12T12:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing text properties within a draft view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-text-properties-within-a-draft-view/m-p/9995794#M119870</link>
      <description>&lt;P&gt;Tip:&amp;nbsp; You can use an InputBox to show yourself what the current contents of the FormattedText is, and have that text be selectable, so you can copy/paste portions of it back into your rule, by simply supplying it as the 'default entry' Input variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is each line of text its own TextBox, or are all the linens of text all part of one large TextBox?&lt;/P&gt;&lt;P&gt;If each line is its own TextBox, you can loop through each TextBox, checking FormattedText.Contains("what you're looking for") (as Boolean), to find the Property you're looking for.&amp;nbsp; Each standard Property has a DisplayName, a Name, a PropID (Long).&lt;/P&gt;&lt;P&gt;And the PropID can be cross referenced with these Enums:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-A76314C2-D203-49C9-BA5D-DA21A2557E24" target="_blank" rel="noopener"&gt;PropertiesForSummaryInformationEnum Enumerator&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-A83CC2C4-21D2-4E72-ABD0-D4211AEBCF1E" target="_blank" rel="noopener"&gt;PropertiesForDocSummaryInformationEnum Enumerator&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-57DC1957-248A-4162-B49C-F1F48DE6B3C8" target="_blank" rel="noopener"&gt;PropertiesForDesignTrackingPropertiesEnum Enumerator&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is also one for the custom properties, but it doesn't contain any values by default:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-2E52005F-FE36-4A0E-8CFC-E02B747872A6" target="_blank" rel="noopener"&gt;PropertiesForUserDefinedPropertiesEnum Enumerator&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, FYI:&amp;nbsp; &lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-915B75BA-4696-4fc7-A2C6-54B2BACDE7E1" target="_self"&gt;Here is the link&lt;/A&gt; to Inventor's help page which attempts to show you how to use XML tags to manipulate FormattedText scenarios.&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;&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;or you can 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>Tue, 12 Jan 2021 14:04:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-text-properties-within-a-draft-view/m-p/9995794#M119870</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-01-12T14:04:33Z</dc:date>
    </item>
  </channel>
</rss>

