<?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 executeTextCommand errer in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/executetextcommand-errer/m-p/9513223#M11742</link>
    <description>&lt;P&gt;Hi there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am very interested in the "Application.executeTextCommand" method implemented in Ver2.0.8335.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-4DA98A57-C8E0-479E-B2FF-EB3C10BAE13F" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-4DA98A57-C8E0-479E-B2FF-EB3C10BAE13F&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a script like this to test a simple process.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;#Fusion360API Python script

import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        txtCmd = 'data.property'
        res = app.executeTextCommand(txtCmd)

        print(res)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, doing so will result in an error.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 421px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/769818i09393A7055650293/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you actually enter the text command (txt), the result will be as follows.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 693px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/769820iC485033564C9F290/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;Isn't there a sample for correct processing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 May 2020 15:04:51 GMT</pubDate>
    <dc:creator>kandennti</dc:creator>
    <dc:date>2020-05-13T15:04:51Z</dc:date>
    <item>
      <title>executeTextCommand errer</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/executetextcommand-errer/m-p/9513223#M11742</link>
      <description>&lt;P&gt;Hi there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am very interested in the "Application.executeTextCommand" method implemented in Ver2.0.8335.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-4DA98A57-C8E0-479E-B2FF-EB3C10BAE13F" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-4DA98A57-C8E0-479E-B2FF-EB3C10BAE13F&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a script like this to test a simple process.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;#Fusion360API Python script

import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        txtCmd = 'data.property'
        res = app.executeTextCommand(txtCmd)

        print(res)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, doing so will result in an error.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 421px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/769818i09393A7055650293/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you actually enter the text command (txt), the result will be as follows.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 693px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/769820iC485033564C9F290/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;Isn't there a sample for correct processing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 15:04:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/executetextcommand-errer/m-p/9513223#M11742</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2020-05-13T15:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: executeTextCommand errer</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/executetextcommand-errer/m-p/9515039#M11743</link>
      <description>&lt;P&gt;I tried but not able to reproduced it. Not sure if this particular text command is making some network call which failed at the time you tried it through API which results in to failure of text command. Please try with some other text command and see if you are getting the same result. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 07:17:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/executetextcommand-errer/m-p/9515039#M11743</guid>
      <dc:creator>goyals</dc:creator>
      <dc:date>2020-05-14T07:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: executeTextCommand errer</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/executetextcommand-errer/m-p/9516026#M11744</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1639694"&gt;@goyals&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you change the language to English, you can execute without problems.&lt;BR /&gt;I strongly hope that it will work in Japanese as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I happened to be interested in the command text (txt) just before Ver2.0.8335 and tried various things.&lt;BR /&gt;I found out that command text is so powerful that you can do things that are not possible with the API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Append.&lt;BR /&gt;This was fine in Japanese as well. It's unstable.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/fusion-360-api-and-scripts/get-if-a-user-is-using-a-paid-version-of-fusion360/m-p/9516077#M10153" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/fusion-360-api-and-scripts/get-if-a-user-is-using-a-paid-version-of-fusion360/m-p/9516077#M10153&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 13:44:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/executetextcommand-errer/m-p/9516026#M11744</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2020-05-14T13:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: executeTextCommand errer</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/executetextcommand-errer/m-p/9516125#M11745</link>
      <description>&lt;P&gt;It was an encoding issue.&lt;BR /&gt;Even in Japanese, this method worked correctly.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;txtCmd = u'data.property'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 13:55:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/executetextcommand-errer/m-p/9516125#M11745</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2020-05-14T13:55:33Z</dc:date>
    </item>
  </channel>
</rss>

