<?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 Problem with Javascript&amp;amp;colon; Palette.sendInfoToHTML returns no response in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10858982#M7040</link>
    <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am developing a palette recently and it worked fine until just now. The Javascript suddenly just refused to return anything.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To identify the problem, I have created a sample to replicate this problem. With a simple palette that connects to a HTML with only "Hello World" as plain text, this script then sends a simple 'hi' message to the HTML.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the same error persists and show 'response empty' message.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jhan97_0-1641372288029.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1007579iBE17075F1B0D0F07/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jhan97_0-1641372288029.png" alt="jhan97_0-1641372288029.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not experienced in Javascript, hence have no idea how to debug this problem. I have restarted Fusion 360 as well, but no help in this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your kind help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jan 2022 08:47:15 GMT</pubDate>
    <dc:creator>j.han97</dc:creator>
    <dc:date>2022-01-05T08:47:15Z</dc:date>
    <item>
      <title>Problem with Javascript&amp;colon; Palette.sendInfoToHTML returns no response</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10858982#M7040</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am developing a palette recently and it worked fine until just now. The Javascript suddenly just refused to return anything.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To identify the problem, I have created a sample to replicate this problem. With a simple palette that connects to a HTML with only "Hello World" as plain text, this script then sends a simple 'hi' message to the HTML.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the same error persists and show 'response empty' message.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jhan97_0-1641372288029.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1007579iBE17075F1B0D0F07/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jhan97_0-1641372288029.png" alt="jhan97_0-1641372288029.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not experienced in Javascript, hence have no idea how to debug this problem. I have restarted Fusion 360 as well, but no help in this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your kind help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 08:47:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10858982#M7040</guid>
      <dc:creator>j.han97</dc:creator>
      <dc:date>2022-01-05T08:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Javascript&amp;colon; Palette.sendInfoToHTML returns no response</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10859051#M7041</link>
      <description>&lt;P&gt;Ok, now I think the Fusion 360 on my computer is broken. When I ran this script:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;import adsk.core, adsk.fusion, adsk.cam, traceback

_app = adsk.core.Application.get()
_ui = _app.userInterface

def run(context):
    try:
        _ui.messageBox('Hello world')

    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def stop(context):
    if _ui:
        _ui.messageBox('Bye bye world')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The 'Hello world' dialog popped out first, then followed by 'Bye bye world' immediately. Seems like Fusion 360 is rushing from run() to stop() recklessly. I will re-install and see if the problem goes away.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 09:30:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10859051#M7041</guid>
      <dc:creator>j.han97</dc:creator>
      <dc:date>2022-01-05T09:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Javascript&amp;colon; Palette.sendInfoToHTML returns no response</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10859120#M7042</link>
      <description>&lt;P&gt;After a clean re-install, Fusion 360 is working normally now. (Although I don't know if it will snap again someday)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a side note, I am experiencing some connectivity issues to Autodesk servers (pure speculation), so the problem might be rooting from there (pure speculation).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, the problem is gone for now, so I will mark this post as solved.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 10:13:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10859120#M7042</guid>
      <dc:creator>j.han97</dc:creator>
      <dc:date>2022-01-05T10:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Javascript&amp;colon; Palette.sendInfoToHTML returns no response</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10859629#M7043</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11275785"&gt;@j.han97&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When sending data from python to Html, it is useful to set it with json.dumps against HTMLEventArgs.returnData property.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-DC2A4AB7-6A24-4A28-87A0-9952A0ABDF74" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-DC2A4AB7-6A24-4A28-87A0-9952A0ABDF74&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also have very little experience with JavaScript, but I learned it from &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7468050"&gt;@thomasa88&lt;/a&gt;&amp;nbsp; and &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3865419"&gt;@JeromeBriot&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/fusion-360-api-and-scripts/i-want-to-set-the-initial-values-for-the-palette-display/m-p/10610275" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/fusion-360-api-and-scripts/i-want-to-set-the-initial-values-for-the-palette-display/m-p/10610275&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I was able to publish this one.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/kantoku-code/Fusion360_PerspectiveAngleController" target="_blank" rel="noopener"&gt;https://github.com/kantoku-code/Fusion360_PerspectiveAngleController&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 14:30:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10859629#M7043</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2022-01-05T14:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Javascript&amp;colon; Palette.sendInfoToHTML returns no response</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10859777#M7044</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3787950"&gt;@kandennti&lt;/a&gt;&amp;nbsp;for the useful information. I definitely need them to make my code more robust.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Besides that, the developer mode mentioned in your post sounds very interesting to me. Since the html is implemented in Fusion 360 (kind of indirect), plus I am not very familiar with Javascript, it is extremely frustrating for me to debug the script. With the developer tools I expect to develop my script more efficiently.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 15:26:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10859777#M7044</guid>
      <dc:creator>j.han97</dc:creator>
      <dc:date>2022-01-05T15:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Javascript&amp;colon; Palette.sendInfoToHTML returns no response</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10860958#M7045</link>
      <description>&lt;P&gt;Thanks to the tips on the developer tools in Fusion 360, I was able to find the problem. There is a mistyped function at the beginning (variable declaration) of the Javascript, which caused the whole script to fail and not returning everything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So lesson learnt: &lt;STRONG&gt;If Javascript gives empty response, check the script!!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 01:53:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10860958#M7045</guid>
      <dc:creator>j.han97</dc:creator>
      <dc:date>2022-01-06T01:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Javascript&amp;colon; Palette.sendInfoToHTML returns no response</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10873569#M7046</link>
      <description>&lt;P&gt;Great! this is helpful, thanks for sharing.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 07:33:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-javascript-amp-colon-palette-sendinfotohtml-returns/m-p/10873569#M7046</guid>
      <dc:creator>rishabsain723</dc:creator>
      <dc:date>2022-01-12T07:33:15Z</dc:date>
    </item>
  </channel>
</rss>

