<?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: what is the ID for the simulation workspace? in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/what-is-the-id-for-the-simulation-workspace/m-p/6399759#M19692</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try to get workspaces by productType and then it should work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This was our mistake how to design the API. One workspace might belong to multiple products and multiple workspaces might associate to one product. We need users' input which workspace of product they want to add toolbar item into. Unfortunately we cannot do cleanup for old&amp;nbsp;design to keep backward compatibility.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We will do improvement to prompt users with meaningful message once users run into the kind of issue in future releases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Marshal&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#FF0000"&gt;auto workspaces = ui-&amp;gt;workspacesByProductType("SimStudiesProductType");&lt;/FONT&gt;
auto workspace = workspaces-&amp;gt;itemById("SimulationEnviroment");
auto toolbarPanels = workspace-&amp;gt;toolbarPanels();
auto panel = toolbarPanels-&amp;gt;add("NewPanelID", "NewPanel"); 
auto panelCtrl = panel-&amp;gt;controls();&lt;/PRE&gt;</description>
    <pubDate>Thu, 23 Jun 2016 08:08:34 GMT</pubDate>
    <dc:creator>marshaltu</dc:creator>
    <dc:date>2016-06-23T08:08:34Z</dc:date>
    <item>
      <title>what is the ID for the simulation workspace?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/what-is-the-id-for-the-simulation-workspace/m-p/6397177#M19689</link>
      <description>&lt;P&gt;Hi, I want to add a button to the simulation workspace, can not find the id for that,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it FusionModelingEnvironment? thanks&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 01:24:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/what-is-the-id-for-the-simulation-workspace/m-p/6397177#M19689</guid>
      <dc:creator>lsRDZZQ</dc:creator>
      <dc:date>2016-06-22T01:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: what is the ID for the simulation workspace?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/what-is-the-id-for-the-simulation-workspace/m-p/6397210#M19690</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It should be 'SimulationEnvironment'. You could iterate all workspaces by the following codes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;#Author-
#Description-

import adsk.core, adsk.fusion, adsk.cam, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        for workspace in ui.workspaces:
            ui.messageBox(workspace.id)

    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;Thanks,&lt;/P&gt;
&lt;P&gt;Marshal&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 02:04:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/what-is-the-id-for-the-simulation-workspace/m-p/6397210#M19690</guid>
      <dc:creator>marshaltu</dc:creator>
      <dc:date>2016-06-22T02:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: what is the ID for the simulation workspace?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/what-is-the-id-for-the-simulation-workspace/m-p/6398407#M19691</link>
      <description>&lt;P&gt;Thanks, I tried it, now i can get the correct workspace object. but when i try to add a panel to Simulation workspace, it always return null. But the same code i can add a panel to solid workspace without any problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;auto workspace = workspaces-&amp;gt;itemById("SimulationEnviroment");
auto toolbarPanels = workspace-&amp;gt;toolbarPanels();
auto panel = toolbarPanels-&amp;gt;add("NewPanelID", "NewPanel"); 
auto panelCtrl = panel-&amp;gt;controls();&lt;/PRE&gt;&lt;P&gt;If i change the id to "FusionSolidEnviroment", toolbarPanels.add can success without any problems. Please help me out. thanks&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 16:15:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/what-is-the-id-for-the-simulation-workspace/m-p/6398407#M19691</guid>
      <dc:creator>lsRDZZQ</dc:creator>
      <dc:date>2016-06-22T16:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: what is the ID for the simulation workspace?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/what-is-the-id-for-the-simulation-workspace/m-p/6399759#M19692</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try to get workspaces by productType and then it should work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This was our mistake how to design the API. One workspace might belong to multiple products and multiple workspaces might associate to one product. We need users' input which workspace of product they want to add toolbar item into. Unfortunately we cannot do cleanup for old&amp;nbsp;design to keep backward compatibility.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We will do improvement to prompt users with meaningful message once users run into the kind of issue in future releases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Marshal&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#FF0000"&gt;auto workspaces = ui-&amp;gt;workspacesByProductType("SimStudiesProductType");&lt;/FONT&gt;
auto workspace = workspaces-&amp;gt;itemById("SimulationEnviroment");
auto toolbarPanels = workspace-&amp;gt;toolbarPanels();
auto panel = toolbarPanels-&amp;gt;add("NewPanelID", "NewPanel"); 
auto panelCtrl = panel-&amp;gt;controls();&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jun 2016 08:08:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/what-is-the-id-for-the-simulation-workspace/m-p/6399759#M19692</guid>
      <dc:creator>marshaltu</dc:creator>
      <dc:date>2016-06-23T08:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: what is the ID for the simulation workspace?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/what-is-the-id-for-the-simulation-workspace/m-p/11924906#M19693</link>
      <description>&lt;P&gt;What would this look like for PANEL_ID’s?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 03:35:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/what-is-the-id-for-the-simulation-workspace/m-p/11924906#M19693</guid>
      <dc:creator>david.lopez7E84R</dc:creator>
      <dc:date>2023-04-27T03:35:53Z</dc:date>
    </item>
  </channel>
</rss>

