<?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 new toolbar panel with API(Python) in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/8229119#M19748</link>
    <description>&lt;P&gt;Thank you for sharing the report number. I tried the steps you mentioned on my machine locally but not seeing the crash. May be under specific situation, Fusion is crashing while trying this workflow. We already have a ticket,FUS-42182, in our internal system to look in to this. I will update you once it is resolved or we might reach out to you to get some more inputs to investigate it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case it is blocking your work, you can try adding your command in to an existing toolbar.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Aug 2018 08:30:19 GMT</pubDate>
    <dc:creator>goyals</dc:creator>
    <dc:date>2018-08-28T08:30:19Z</dc:date>
    <item>
      <title>How to create a new toolbar panel with API(Python)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/6392468#M19741</link>
      <description>&lt;P&gt;Hi. I want to create a new toolbar panel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you give me a example code to create a new toolbar panel?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 01:19:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/6392468#M19741</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-20T01:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new toolbar panel with API(Python)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/6392619#M19742</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The addin below demonstrates how to create a new toolbar panel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;import adsk.core, adsk.fusion, adsk.cam, traceback

tbPanel = None
def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        
        workSpace = ui.workspaces.itemById('FusionSolidEnvironment')
        tbPanels = workSpace.toolbarPanels
        
        global tbPanel
        tbPanel = tbPanels.itemById('NewPanel')
        if tbPanel:
            tbPanel.deleteMe()
        tbPanel = tbPanels.add('NewPanel', 'New Panel', 'SelectPanel', False)
        
        # Empty panel can't be displayed. Add a command to the panel
        cmdDef = ui.commandDefinitions.itemById('NewCommand')
        if cmdDef:
            cmdDef.deleteMe()
        cmdDef = ui.commandDefinitions.addButtonDefinition('NewCommand', 'New Command', 'Demo for new command')
        tbPanel.controls.addCommand(cmdDef)
        
        ui.messageBox('Hello addin')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def stop(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        
        if tbPanel:
            tbPanel.deleteMe()
        
        ui.messageBox('Stop addin')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
&lt;/PRE&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Jack&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 05:09:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/6392619#M19742</guid>
      <dc:creator>liujac</dc:creator>
      <dc:date>2016-06-20T05:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new toolbar panel with API(Python)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/6392866#M19743</link>
      <description>&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 08:16:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/6392866#M19743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-20T08:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new toolbar panel with API(Python)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/7587200#M19744</link>
      <description>&lt;P&gt;Hey. I've got a python script I already wrote and would like to make a button for this... Can you explain how to add this premade script? can it be linked? or does this need to be just written into the above code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 21:01:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/7587200#M19744</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-30T21:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new toolbar panel with API(Python)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/8221931#M19745</link>
      <description>&lt;P&gt;Hi, when I add this code to a fresh new custom Add-In, then Fusion360 crashes as soon as I click on the 'Tools' Ribbon on top of the program. This happens each time. Any ideo what is going wrong...? Thanks!!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 08:59:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/8221931#M19745</guid>
      <dc:creator>TheRealWilliam</dc:creator>
      <dc:date>2018-08-24T08:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new toolbar panel with API(Python)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/8226738#M19746</link>
      <description>&lt;P&gt;Fusion might be asking to send the report to Autodesk when it crashes. May I know the number you see at the last page after submitting the report so I can look at it. It would be easy to investigate&amp;nbsp;if you can share the script.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 12:17:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/8226738#M19746</guid>
      <dc:creator>goyals</dc:creator>
      <dc:date>2018-08-27T12:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new toolbar panel with API(Python)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/8228963#M19747</link>
      <description>&lt;P&gt;So, here is what I did:&lt;/P&gt;&lt;P&gt;I created a new addin and clicked 'Edit'. Spyder2 opened, and I pasted the code from the user above, replacing everything in the document. I saved the file, and clicked 'Run' in the Fusion360 Addins panel. Then Fusion crashed instantly.&lt;/P&gt;&lt;P&gt;I submitted the report, here ist the number:&lt;/P&gt;&lt;PRE&gt;Thank you for sending your error report CER_178339672 to Autodesk.&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Aug 2018 07:06:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/8228963#M19747</guid>
      <dc:creator>TheRealWilliam</dc:creator>
      <dc:date>2018-08-28T07:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new toolbar panel with API(Python)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/8229119#M19748</link>
      <description>&lt;P&gt;Thank you for sharing the report number. I tried the steps you mentioned on my machine locally but not seeing the crash. May be under specific situation, Fusion is crashing while trying this workflow. We already have a ticket,FUS-42182, in our internal system to look in to this. I will update you once it is resolved or we might reach out to you to get some more inputs to investigate it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case it is blocking your work, you can try adding your command in to an existing toolbar.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 08:30:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-a-new-toolbar-panel-with-api-python/m-p/8229119#M19748</guid>
      <dc:creator>goyals</dc:creator>
      <dc:date>2018-08-28T08:30:19Z</dc:date>
    </item>
  </channel>
</rss>

