<?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 Input parameter of CommandDefinition execute method in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/input-parameter-of-commanddefinition-execute-method/m-p/12476766#M2209</link>
    <description>&lt;P class=""&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-7ffc950f-92e8-47bc-8228-54b67ae8e2c8" target="_blank" rel="noopener nofollow ugc"&gt;According to the Fusion 360 API documentation&lt;/A&gt;, the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;execute()&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;method on a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;CommandDefinition&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;accepts an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;input&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;parameter.&lt;/P&gt;&lt;P class=""&gt;How do I access the values in the command that's being called?&lt;/P&gt;&lt;P class=""&gt;I have the following snippet here in one of my commands:&lt;/P&gt;&lt;PRE&gt;cmd = ui.commandDefinitions.itemById(CMD_ID)
x = adsk.core.NamedValues.create()
x.add('message', adsk.core.ValueInput.createByString('hey'))
cmd.execute(x)&lt;/PRE&gt;&lt;P class=""&gt;How do I access&lt;SPAN&gt;&amp;nbsp;`&lt;/SPAN&gt;message`&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;`&lt;/SPAN&gt;hey`&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;when my other command (with&lt;SPAN&gt;&amp;nbsp;`&lt;/SPAN&gt;CMD_ID`) is created?&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2024 15:14:25 GMT</pubDate>
    <dc:creator>siliconlad</dc:creator>
    <dc:date>2024-01-04T15:14:25Z</dc:date>
    <item>
      <title>Input parameter of CommandDefinition execute method</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/input-parameter-of-commanddefinition-execute-method/m-p/12476766#M2209</link>
      <description>&lt;P class=""&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-7ffc950f-92e8-47bc-8228-54b67ae8e2c8" target="_blank" rel="noopener nofollow ugc"&gt;According to the Fusion 360 API documentation&lt;/A&gt;, the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;execute()&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;method on a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;CommandDefinition&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;accepts an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;input&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;parameter.&lt;/P&gt;&lt;P class=""&gt;How do I access the values in the command that's being called?&lt;/P&gt;&lt;P class=""&gt;I have the following snippet here in one of my commands:&lt;/P&gt;&lt;PRE&gt;cmd = ui.commandDefinitions.itemById(CMD_ID)
x = adsk.core.NamedValues.create()
x.add('message', adsk.core.ValueInput.createByString('hey'))
cmd.execute(x)&lt;/PRE&gt;&lt;P class=""&gt;How do I access&lt;SPAN&gt;&amp;nbsp;`&lt;/SPAN&gt;message`&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;`&lt;/SPAN&gt;hey`&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;when my other command (with&lt;SPAN&gt;&amp;nbsp;`&lt;/SPAN&gt;CMD_ID`) is created?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 15:14:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/input-parameter-of-commanddefinition-execute-method/m-p/12476766#M2209</guid>
      <dc:creator>siliconlad</dc:creator>
      <dc:date>2024-01-04T15:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Input parameter of CommandDefinition execute method</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/input-parameter-of-commanddefinition-execute-method/m-p/12479127#M2210</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14919503"&gt;@siliconlad&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure I understand what you want to do, but I have little information on the arguments of the CommandDefinition.execute method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a possibility that you can do what you want by using a text command.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/kantoku-code/Fusion360_Small_Tools_for_Developers/tree/master/TextCommands" target="_blank" rel="noopener"&gt;https://github.com/kantoku-code/Fusion360_Small_Tools_for_Developers/tree/master/TextCommands&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, it is more difficult to develop than the normal API.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 15:46:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/input-parameter-of-commanddefinition-execute-method/m-p/12479127#M2210</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-01-05T15:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Input parameter of CommandDefinition execute method</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/input-parameter-of-commanddefinition-execute-method/m-p/12488928#M2211</link>
      <description>&lt;P&gt;I've figured out a way around this. I was just curious how I could use the argument for `CommandDefinition.execute` because it looked like it would provide a cleaner solution to what I wanted to achieve. It's weird that it's in the API documentation, but there's indicatino of how to use it?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 17:25:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/input-parameter-of-commanddefinition-execute-method/m-p/12488928#M2211</guid>
      <dc:creator>siliconlad</dc:creator>
      <dc:date>2024-01-10T17:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Input parameter of CommandDefinition execute method</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/input-parameter-of-commanddefinition-execute-method/m-p/12492162#M2212</link>
      <description>&lt;P&gt;That argument was added for possible future use. The Inventor API has similar functionality, and I thought it could also be useful in Fusion. It was never intended as a way to provide all of the required input for all commands, but can be useful in a few fringe cases. It would primarily be used for commands that display a dialog. For example, in Inventor, you could provide the filename and execute the component insert command, and it would bypass the dialog, using the provided filename, and go into the next step where the user can move the mouse around to position the component. Nothing has been done in Fusion to take advantage of this yet.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 00:39:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/input-parameter-of-commanddefinition-execute-method/m-p/12492162#M2212</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2024-01-12T00:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Input parameter of CommandDefinition execute method</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/input-parameter-of-commanddefinition-execute-method/m-p/14008100#M22579</link>
      <description>&lt;P&gt;Another promising feature that turned out to be a dead-end. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;If Fusion itself does not need it that's no reason not to pass the parameter on to 3rd party commands for them to use.&lt;BR /&gt;And yes, it could also be used by Fusion to allow bypassing prompts for files, configurations or even derive selections.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 21:37:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/input-parameter-of-commanddefinition-execute-method/m-p/14008100#M22579</guid>
      <dc:creator>ltomuta</dc:creator>
      <dc:date>2026-02-06T21:37:54Z</dc:date>
    </item>
  </channel>
</rss>

