<?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: Method - &amp;quot;addButtonDefinition&amp;quot; in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7035807#M18234</link>
    <description>&lt;P&gt;Oh, I see what you are saying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't quite see the purpose of re-naming someone elses Add-in anyhow. You will be better off learning how to create a dialogue box by writing your own add-in from the ground up.&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;</description>
    <pubDate>Sun, 23 Apr 2017 01:58:54 GMT</pubDate>
    <dc:creator>Six1Seven1</dc:creator>
    <dc:date>2017-04-23T01:58:54Z</dc:date>
    <item>
      <title>Method - "addButtonDefinition"</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7034792#M18230</link>
      <description>&lt;P&gt;Hello there&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am tring redo Bolt example for my purposes. There is some part of original code.&lt;/P&gt;&lt;PRE&gt;if not cmdDef:
    cmdDef = commandDefinitions.addButtonDefinition('Bolt',
            'Create Bolt',
            'Create a bolt.',
            './resources') # relative resource file path is specified&lt;/PRE&gt;&lt;P&gt;I need to change names of some variables and do little changes in apperiance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But after renaming nothing hapend untill I reload Fusion 360.&lt;/P&gt;&lt;PRE&gt;if not cmdDef:
    cmdDef = commandDefinitions.addButtonDefinition('Box',
            'Create Box',
            'Create a box.',
            './resources') # relative resource file path is specified&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bolt.JPG" style="width: 259px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/348105i3C91819272F7F209/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bolt.JPG" alt="Bolt.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2017 00:31:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7034792#M18230</guid>
      <dc:creator>copypastestd</dc:creator>
      <dc:date>2017-04-22T00:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Method - "addButtonDefinition"</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7035406#M18231</link>
      <description>&lt;P&gt;Another problem that afrer renaming, at some moment UI input window changed to default. And I couldn't turn it back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Box.JPG" style="width: 270px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/348202i8DA7251F3E09CB4C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Box.JPG" alt="Box.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2017 16:09:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7035406#M18231</guid>
      <dc:creator>copypastestd</dc:creator>
      <dc:date>2017-04-22T16:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Method - "addButtonDefinition"</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7035507#M18232</link>
      <description>I'm not sure what exactly you are asking for. The reason you have to reload fusion when you want to re-execute the script is likely due to the STOP function not deleting the button when hitting 'stop' from the addin menu.&lt;BR /&gt;&lt;BR /&gt;Also it's a good idea to make sure you have an icon in the resources path in the button definition.&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Sat, 22 Apr 2017 17:44:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7035507#M18232</guid>
      <dc:creator>Six1Seven1</dc:creator>
      <dc:date>2017-04-22T17:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Method - "addButtonDefinition"</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7035556#M18233</link>
      <description>&lt;P&gt;Tnx for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me refrase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to do a script, which would do a box via the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually, general part is done (it works through hardcode parameters), but I wonna&amp;nbsp;add input paramaters window like in picture above.&lt;/P&gt;&lt;P&gt;Where user could fill in thickness, sizes etc for desired box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I tried to use Bolt example as a template, I had some problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In code I renamed all variables, handlers, and other names from Bolt to Box (for example: BoltCommandExecuteHandler =&amp;gt; &lt;SPAN&gt;BoxCommandExecuteHandler&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;I looked at the whole code to double check it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But as a result I have default input window:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="large.png" style="width: 270px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/348227iA4E168B3B1F52A62/image-size/large?v=v2&amp;amp;px=999" role="button" title="large.png" alt="large.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that it became a little clearer.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2017 18:26:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7035556#M18233</guid>
      <dc:creator>copypastestd</dc:creator>
      <dc:date>2017-04-22T18:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Method - "addButtonDefinition"</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7035807#M18234</link>
      <description>&lt;P&gt;Oh, I see what you are saying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't quite see the purpose of re-naming someone elses Add-in anyhow. You will be better off learning how to create a dialogue box by writing your own add-in from the ground up.&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 01:58:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7035807#M18234</guid>
      <dc:creator>Six1Seven1</dc:creator>
      <dc:date>2017-04-23T01:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Method - "addButtonDefinition"</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7038008#M18235</link>
      <description>&lt;P&gt;That's not a default input window but is a command window that contains the command inputs defined by that add-in. &amp;nbsp;You need to look at the handler for the command created event. &amp;nbsp;You'll find the API calls there where it's creating the selection and drop down command inputs that you're seeing. &amp;nbsp;You'll want to replace those calls a string value input and several value inputs. &amp;nbsp;And in the handler function for the execute event you'll need to read the values of those inputs and use those to create the box.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 14:31:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7038008#M18235</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2017-04-24T14:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Method - "addButtonDefinition"</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7038927#M18236</link>
      <description>&lt;P&gt;You are right, it is not a "default" windows as I thought before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem was in renaming. I named my inner class - Box(), this name the same as build-in comand Box.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Box.png" style="width: 358px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/348863i830E7710650377EF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Box.png" alt="Box.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Problem disappered when I change name to something unique - BOX() or Boxx() - work fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I still don't know how to change this parameters without reload Fusion 360 - to see changes.&lt;/P&gt;&lt;PRE&gt;returnValue = commandDefinitions_var.addButtonDefinition(id, name, tooltip, resourceFolder)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 20:15:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7038927#M18236</guid>
      <dc:creator>copypastestd</dc:creator>
      <dc:date>2017-04-24T20:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Method - "addButtonDefinition"</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7039286#M18237</link>
      <description>&lt;P&gt;You shouldn't have to shut down and restart Fusion after every code change if you're add-in is behaving correctly. &amp;nbsp;Mainly, by "behaving correctly" I mean that it cleans up everything in the stop function that it added to the UI in the run function. &amp;nbsp;Otherwise it will try creating a command definition using the name of one that already exists and will fail there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming your add-in does clean up after itself correctly, here are the steps to stopping and restarting an add-in after making changes to your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Go to the "Scripts and Add-Ins" command, find your add-in (which should have the little circle of dots beside it indicating it is running), select it, and click the "Stop" button on the dialog.&lt;/LI&gt;
&lt;LI&gt;In the "Scripts and Add-Ins" dialog, select your add-in and click the "Run" button.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;That should be it. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're debugging your add-in, you should first make sure that you're not at a break point and your program is halted. &amp;nbsp;You can click the "Continue Execution" button to have it continue running. &amp;nbsp;If there are any message boxes displayed you'll need to click on those so your add-in and continue. &amp;nbsp;You can also click the "Exit Debug" command to stop execution, which will likely cause one or more message boxes to be displayed that you'll need to dismiss. &amp;nbsp;Then you'll still need to stop and restart your add-in in the "Scripts and Add-Ins" dialog.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 23:01:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7039286#M18237</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2017-04-24T23:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Method - "addButtonDefinition"</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7899532#M18238</link>
      <description>&lt;P&gt;k.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Apr 2018 13:16:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/method-quot-addbuttondefinition-quot/m-p/7899532#M18238</guid>
      <dc:creator>eric</dc:creator>
      <dc:date>2018-04-01T13:16:45Z</dc:date>
    </item>
  </channel>
</rss>

