<?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: How to create a `BrowserCommandInput` and populate it with initial data from Fusion? in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-browsercommandinput-and-populate-it-with-initial/m-p/12560109#M2018</link>
    <description>&lt;P&gt;Works for me, thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2024 15:20:20 GMT</pubDate>
    <dc:creator>jan_weidner</dc:creator>
    <dc:date>2024-02-14T15:20:20Z</dc:date>
    <item>
      <title>How to create a `BrowserCommandInput` and populate it with initial data from Fusion?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-browsercommandinput-and-populate-it-with-initial/m-p/12550309#M2015</link>
      <description>&lt;P&gt;How to create a `BrowserCommandInput` and populate it with initial data from Fusion?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Generally, I can use `browserCommandInput.sendInfoToHTML(action, data)` to send data from Fusion360 to javascript.&lt;/P&gt;&lt;P&gt;However, it does not work for me if I do it in the CommandCreatedHandler, this function just returns false for me.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;class MyCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            # Get the command that was created.
            cmd = adsk.core.Command.cast(args.command)
            inputs: adsk.core.CommandInputs = cmd.commandInputs
            b = inputs.addBrowserCommandInput(...)
            b.sendInfoToHTML(...) # returns false, has no effect
&lt;/LI-CODE&gt;&lt;P&gt;What is the recommended way to create a `BrowserCommandInput` and populate it with initial data from Fusion?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 09:23:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-browsercommandinput-and-populate-it-with-initial/m-p/12550309#M2015</guid>
      <dc:creator>jan_weidner</dc:creator>
      <dc:date>2024-02-09T09:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a `BrowserCommandInput` and populate it with initial data from Fusion?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-browsercommandinput-and-populate-it-with-initial/m-p/12551104#M2016</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14191883"&gt;@jan_weidner&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created a sample script.&lt;/P&gt;
&lt;P&gt;The attached script passes the name of the active document at the time of execution from python to javascript and displays it with BrowserCommandInput.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 15:40:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-browsercommandinput-and-populate-it-with-initial/m-p/12551104#M2016</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-02-09T15:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a `BrowserCommandInput` and populate it with initial data from Fusion?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-browsercommandinput-and-populate-it-with-initial/m-p/12559958#M2017</link>
      <description>&lt;P&gt;Thanks a lot I only now noticed your reply, I will look into it and come back to you.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 14:13:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-browsercommandinput-and-populate-it-with-initial/m-p/12559958#M2017</guid>
      <dc:creator>jan_weidner</dc:creator>
      <dc:date>2024-02-14T14:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a `BrowserCommandInput` and populate it with initial data from Fusion?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-browsercommandinput-and-populate-it-with-initial/m-p/12560109#M2018</link>
      <description>&lt;P&gt;Works for me, thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 15:20:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-browsercommandinput-and-populate-it-with-initial/m-p/12560109#M2018</guid>
      <dc:creator>jan_weidner</dc:creator>
      <dc:date>2024-02-14T15:20:20Z</dc:date>
    </item>
  </channel>
</rss>

