<?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: Python API TableCommandInput not displaying correctly in Fusion Support Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-support-forum/python-api-tablecommandinput-not-displaying-correctly/m-p/9201963#M129117</link>
    <description>&lt;P&gt;Ok I am sorry. When looking for the place to report bugs, this forum was suggested. Since it seems to be a bug and not a question about using the API I thought putting it here would be right.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2019 22:26:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-12-13T22:26:03Z</dc:date>
    <item>
      <title>Python API TableCommandInput not displaying correctly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/python-api-tablecommandinput-not-displaying-correctly/m-p/9201668#M129115</link>
      <description>&lt;P&gt;I am having an issue with the TableCommandInput in the Python API not displaying correctly when it has more than one row and a toolbarCommandInput. I have confirmed on the API forum that the code is working correctly for other people.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am on:&lt;/P&gt;&lt;P&gt;MacOS 10.15.2&lt;/P&gt;&lt;P&gt;Fusion&amp;nbsp;&lt;SPAN&gt;2.0.7036&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#Fusion360API Python script

import adsk.core, adsk.fusion, traceback

_ui  = None
_handlers = []

class MyCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            cmd = adsk.core.Command.cast(args.command)
            inputs = cmd.commandInputs
            
            onDestroy = MyCommandDestroyHandler()
            cmd.destroy.add(onDestroy)
            _handlers.append(onDestroy)

            table = inputs.addTableCommandInput('table', '', 4, "")

            for i in range(4):
                for j in range(4):
                    ci = table.commandInputs.addTextBoxCommandInput("tb{}{}".format(i, j), "", "{} . {}".format(i, j), 1, True)
                    table.addCommandInput(ci, i, j)

            button = table.commandInputs.addBoolValueInput('button', 'Button', False, '', True)
            table.addToolbarCommandInput(button)

        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

            
class MyCommandDestroyHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            adsk.terminate()
        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def run(context):
    try:
        app = adsk.core.Application.get()

        global _ui
        _ui = app.userInterface
        
        cmdDef = _ui.commandDefinitions.itemById('table_test')
        if cmdDef:
            cmdDef.deleteMe()

        cmdDef = _ui.commandDefinitions.addButtonDefinition('table_test', 'table_test', 'table_test')

        onCommandCreated = MyCommandCreatedHandler()
        cmdDef.commandCreated.add(onCommandCreated)
        _handlers.append(onCommandCreated)
        
        cmdDef.execute()

        adsk.autoTerminate(False)
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 19:12:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/python-api-tablecommandinput-not-displaying-correctly/m-p/9201668#M129115</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-13T19:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Python API TableCommandInput not displaying correctly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/python-api-tablecommandinput-not-displaying-correctly/m-p/9201790#M129116</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No need to duplicate your discussion. The first one is in the good forum (i.e. &lt;A href="https://forums.autodesk.com/t5/fusion-360-api-and-scripts/troubles-with-table-commandinputs/m-p/9199311#M8997" target="_blank" rel="noopener"&gt;API forum&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;Be patient. Someone at Autodesk will surely add this to the bug tracking system.&lt;/P&gt;
&lt;P&gt;People here are less concerned by coding issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 20:38:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/python-api-tablecommandinput-not-displaying-correctly/m-p/9201790#M129116</guid>
      <dc:creator>JeromeBriot</dc:creator>
      <dc:date>2019-12-13T20:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python API TableCommandInput not displaying correctly</title>
      <link>https://forums.autodesk.com/t5/fusion-support-forum/python-api-tablecommandinput-not-displaying-correctly/m-p/9201963#M129117</link>
      <description>&lt;P&gt;Ok I am sorry. When looking for the place to report bugs, this forum was suggested. Since it seems to be a bug and not a question about using the API I thought putting it here would be right.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 22:26:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-support-forum/python-api-tablecommandinput-not-displaying-correctly/m-p/9201963#M129117</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-13T22:26:03Z</dc:date>
    </item>
  </channel>
</rss>

