<?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: about  SetPromptResultText () in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/about-setpromptresulttext/m-p/7541887#M97848</link>
    <description>&lt;P&gt;Hey &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5088096"&gt;@zhikaobi1725&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for misleading. &lt;EM&gt;&lt;SPAN class="lia-search-match-lithium"&gt;SetPromptResultText&lt;/SPAN&gt;&lt;/EM&gt;&amp;nbsp; can only be used on the TextBox whose format meets some certain format. Please add following judgment to your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;If InStr(1, oTextBox.FormattedText, "&amp;lt;Prompt ") = 1 Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call oTitleBlock.SetPromptResultText(oTextBox, "test")&lt;BR /&gt;End If&lt;/P&gt;</description>
    <pubDate>Tue, 14 Nov 2017 09:11:33 GMT</pubDate>
    <dc:creator>JaneFan</dc:creator>
    <dc:date>2017-11-14T09:11:33Z</dc:date>
    <item>
      <title>about  SetPromptResultText ()</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/about-setpromptresulttext/m-p/7396670#M97845</link>
      <description>&lt;P&gt;I am&amp;nbsp; a new in&amp;nbsp; inventor&amp;nbsp; API&amp;nbsp;: Now, I have a question to ask . thanks for lots first&lt;/P&gt;&lt;P&gt;&amp;nbsp;I use one code&amp;nbsp; downloaded form this forum to learn .&amp;nbsp;as following&lt;/P&gt;&lt;P&gt;&amp;nbsp;when the code run to&lt;U&gt;&amp;nbsp; &lt;EM&gt;oTitleBlock.SetPromptResultText (oTextBox,"HELLO WORLD!!!") &lt;/EM&gt;&lt;/U&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt; a&amp;nbsp; error&amp;nbsp;&amp;nbsp; happens&lt;/P&gt;&lt;P&gt;&amp;nbsp;showing"Conpile error: syntax error"&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I downloaded orthers code with the funtion&amp;nbsp; SetPromptResultText() ,a&amp;nbsp; same question happens&lt;/P&gt;&lt;P&gt;My&amp;nbsp; inventor ver. is&amp;nbsp;&amp;lt; inventor&amp;nbsp; professional 2015&amp;gt;,&amp;nbsp; Could&amp;nbsp; any&amp;nbsp; specilist&amp;nbsp;&amp;nbsp; tell me? WHY?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sub title()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;Dim oSheet As Sheet&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;Dim oTitleBlock As TitleBlock&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;Dim oTextBox As TextBox&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;Dim oTextBoxes As TextBoxes&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;Set oSheet = ThisApplication.ActiveDocument.ActiveSheet&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;If oSheet.TitleBlock Is Nothing Then Exit Sub&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;Set oTitleBlock = oSheet.TitleBlock&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;If oTitleBlock.Definition.Sketch.TextBoxes Is Nothing Then Exit Sub&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;Set oTextBoxes = oTitleBlock.Definition.Sketch.TextBoxes&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;For Each oTextBox In oTextBoxes&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; If oTextBox.Text = "MYPROMPTEDTEXT" Then Exit For&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;If oTextBox Is Nothing Or oTextBox.Text &amp;lt;&amp;gt; "MYPROMPTEDTEXT" Then&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;oTitleBlock.SetPromptResultText (oTextBox,"HELLO WORLD!!!"）&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;End If&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;End If&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;Next&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;End Sub&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 05:20:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/about-setpromptresulttext/m-p/7396670#M97845</guid>
      <dc:creator>zhikaobi1725</dc:creator>
      <dc:date>2017-09-21T05:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: about  SetPromptResultText ()</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/about-setpromptresulttext/m-p/7396886#M97846</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5088096"&gt;@zhikaobi1725&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your reporting. This seems an API issue to me. I will get it logged in our internal system.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 06:30:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/about-setpromptresulttext/m-p/7396886#M97846</guid>
      <dc:creator>JaneFan</dc:creator>
      <dc:date>2017-09-21T06:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: about  SetPromptResultText ()</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/about-setpromptresulttext/m-p/7396981#M97847</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;FONT face="宋体"&gt;Dear JaneFan:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;FONT face="宋体"&gt;&amp;nbsp;Thank you for your answer about this question at first time &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;FONT face="宋体"&gt;Let me know when you have a correct solution.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 07:06:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/about-setpromptresulttext/m-p/7396981#M97847</guid>
      <dc:creator>zhikaobi1725</dc:creator>
      <dc:date>2017-09-21T07:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: about  SetPromptResultText ()</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/about-setpromptresulttext/m-p/7541887#M97848</link>
      <description>&lt;P&gt;Hey &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5088096"&gt;@zhikaobi1725&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for misleading. &lt;EM&gt;&lt;SPAN class="lia-search-match-lithium"&gt;SetPromptResultText&lt;/SPAN&gt;&lt;/EM&gt;&amp;nbsp; can only be used on the TextBox whose format meets some certain format. Please add following judgment to your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;If InStr(1, oTextBox.FormattedText, "&amp;lt;Prompt ") = 1 Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call oTitleBlock.SetPromptResultText(oTextBox, "test")&lt;BR /&gt;End If&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 09:11:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/about-setpromptresulttext/m-p/7541887#M97848</guid>
      <dc:creator>JaneFan</dc:creator>
      <dc:date>2017-11-14T09:11:33Z</dc:date>
    </item>
  </channel>
</rss>

