<?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 set a state table as the state profile of a State Bar? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14092882#M100775</link>
    <description>&lt;P&gt;There are many different states. Some suit for only special objects others are fundamental. FlexSim needs some time to collect used states. This is what you observe.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Apr 2026 07:27:23 GMT</pubDate>
    <dc:creator>joerg_vogel_HsH</dc:creator>
    <dc:date>2026-04-16T07:27:23Z</dc:date>
    <item>
      <title>How to set a state table as the state profile of a State Bar?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14092237#M100773</link>
      <description>&lt;P&gt;Hello, I have created a state table and a State Bar. Since there is only one state table, this state table is automatically shown on the state profile of this State Bar. However, when I start simulation, nothing shows on the State Bar. But after I re-select the state table some times, then it works. Here is my code, can anyone solve this problem?&lt;/P&gt;&lt;P&gt;Object utilizationview = maintree().find("project/exec/globals/ChartTemplateDefinitions/State/StateBar");&lt;BR /&gt;Object chart_utilization = function_s(dashview, "createGraphWindow", utilizationview, 1);&lt;BR /&gt;Group group_utilization = getvarnode(chart_utilization, "replacements").subnodes["Objects"].value;&lt;BR /&gt;for(int i = 1; i &amp;lt;= utilization_targets.length; i++)&lt;BR /&gt;{&lt;BR /&gt;Object q = Model.find(utilization_targets[i]);&lt;BR /&gt;group_utilization.addMember(q);&lt;BR /&gt;}&lt;BR /&gt;treenode statetable = Tools.create("StateTable","Default");&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="royjuventus29_0-1776280383231.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1633615i1542280CBA8F43F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="royjuventus29_0-1776280383231.png" alt="royjuventus29_0-1776280383231.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 19:13:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14092237#M100773</guid>
      <dc:creator>royjuventus29</dc:creator>
      <dc:date>2026-04-15T19:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a state table as the state profile of a State Bar?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14092882#M100775</link>
      <description>&lt;P&gt;There are many different states. Some suit for only special objects others are fundamental. FlexSim needs some time to collect used states. This is what you observe.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2026 07:27:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14092882#M100775</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2026-04-16T07:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a state table as the state profile of a State Bar?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14093257#M100781</link>
      <description>&lt;P&gt;Thank you for the answer. It works manually. I would like to achieve it by Flexscript, but it doesn't work with the code I paste. Do you know how to solve the problem?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2026 11:10:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14093257#M100781</guid>
      <dc:creator>royjuventus29</dc:creator>
      <dc:date>2026-04-16T11:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a state table as the state profile of a State Bar?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14093567#M100783</link>
      <description>&lt;P&gt;"MAIN:/project/library/statistics/StateTable&amp;gt;behaviour/eventfunctions/BuildFromProfile" There you see that a profiile is built from a trackedvariable and also just from a table.&lt;/P&gt;&lt;P&gt;I think you can have somewhere a table in a format that is equal to a state profile table and you update just your own state profile table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2026 14:07:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14093567#M100783</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2026-04-16T14:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a state table as the state profile of a State Bar?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14093623#M100785</link>
      <description>&lt;P&gt;But I want to link the state table I created into a State Bar of the dashboard. Do you know how to do it?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2026 14:49:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14093623#M100785</guid>
      <dc:creator>royjuventus29</dc:creator>
      <dc:date>2026-04-16T14:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a state table as the state profile of a State Bar?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14094689#M100794</link>
      <description>&lt;P&gt;You need to assign the created state table to the statetable node in the "replacements" of the chart node. This will make the chart use the state table for displaying the states. Then you also need to run the "onApply" function of the chart which links the state table to the corresponding Statistics Collector.&lt;/P&gt;&lt;P&gt;You see the state table in the properties drop down because that gets populated with all state tables present in the model. That doesn't mean that the table is linked to the chart.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;treenode chart_utilization = ...;
Object stateTable = ...;
getvarnode(chart_utilization, "replacements").subnodes["StateTable"].value = stateTable;
function_s(chart_utilization, "onApply");&lt;/LI-CODE&gt;&lt;P&gt;You can find stuff like this by exploring the GUI elements. In this case, when selecting a table from the dropdown, the following code is executed:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-04-17 110611.png" style="width: 526px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1634070i0C8684A659B1EE10/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-04-17 110611.png" alt="Screenshot 2026-04-17 110611.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;"applylinks" sets the node value in the "replacements" to the selected table. For the second line we traverse the tree up to the node on which the function_s is called ("c" is the GUI element for which this function is defined, i.e. the next object node above the function node).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-04-17 110647.png" style="width: 591px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1634071i11C2114AFBD020DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-04-17 110647.png" alt="Screenshot 2026-04-17 110647.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This in turn executes the "onApply" on the focus object which is the chart node.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2026 09:14:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-a-state-table-as-the-state-profile-of-a-state-bar/m-p/14094689#M100794</guid>
      <dc:creator>FelixMoehlmann</dc:creator>
      <dc:date>2026-04-17T09:14:48Z</dc:date>
    </item>
  </channel>
</rss>

