<?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 link StateTables with state_current&amp;gt;profile of an object? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556430#M59919</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I tried. I have put state_profiles inside the TaskExecuter, and when I change using setstate(object, state, profile) the state_profiles current changes, however, the name associated into that state is not shown on TaskExecuter state (it shows idle or whatever the default state_current is).&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 28 Feb 2023 11:31:08 GMT</pubDate>
    <dc:creator>jouky_d</dc:creator>
    <dc:date>2023-02-28T11:31:08Z</dc:date>
    <item>
      <title>How to link StateTables with state_current&gt;profile of an object?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556428#M59917</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 23.0.3 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have created a StateTable with 8 states. However, when I want to change the state in the Process Flow of an element, I can only use the Default table.&lt;/P&gt;
 &lt;P&gt;How can I use my new State table? I tried to write the following script to change the state:&lt;/P&gt;
 &lt;P&gt;#define Default 0&lt;/P&gt;
 &lt;P&gt;Object object1 = token.MotorElevacion;&lt;/P&gt;
 &lt;P&gt;int state = 2;&lt;/P&gt;
 &lt;P&gt;int profile = Default;&lt;/P&gt;
 &lt;P&gt;object1.setState(state, profile);&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;changing the Default 0 value into 1 or 2 and using object1.stats.state("NewStateTable").valueString = "State3"; or object1.stats.state("NewStateTable").value = 1;&lt;BR /&gt;&lt;BR /&gt;Could someone help me please?:)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Feb 2023 10:33:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556428#M59917</guid>
      <dc:creator>jouky_d</dc:creator>
      <dc:date>2023-02-28T10:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to link StateTables with state_current&gt;profile of an object?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556429#M59918</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;A state table only used to influence how states are displayed/interpreted in dashboard charts. In the background the object still uses the default state profile, but the names of the states are "overwritten" by the state table in the chart.&lt;/P&gt;&lt;P&gt;If you want to a add an actual second state profile to an object (that runs in parallel, the object will have a state in each profile) you can follow the description in &lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/questions/26312/add-custom-state-to-a-state-gantt-chart.html" target="_blank"&gt;this post&lt;/A&gt;.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Feb 2023 10:50:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556429#M59918</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2023-02-28T10:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to link StateTables with state_current&gt;profile of an object?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556430#M59919</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I tried. I have put state_profiles inside the TaskExecuter, and when I change using setstate(object, state, profile) the state_profiles current changes, however, the name associated into that state is not shown on TaskExecuter state (it shows idle or whatever the default state_current is).&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Feb 2023 11:31:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556430#M59919</guid>
      <dc:creator>jouky_d</dc:creator>
      <dc:date>2023-02-28T11:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to link StateTables with state_current&gt;profile of an object?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556431#M59920</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The statistics panel in the properties will always show the current state in the default state profile with the name set in that profile node.&lt;/P&gt;&lt;P&gt;You can edit the default profile for a given object in the tree.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1677584799935.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1515676i414323977E0D2694/image-size/large?v=v2&amp;amp;px=999" role="button" title="1677584799935.png" alt="1677584799935.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1677584828499.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1515678iEAE928C390BBBA65/image-size/large?v=v2&amp;amp;px=999" role="button" title="1677584828499.png" alt="1677584828499.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1677584876817.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1515679iE0ECB740EF3BC655/image-size/large?v=v2&amp;amp;px=999" role="button" title="1677584876817.png" alt="1677584876817.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Feb 2023 11:48:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556431#M59920</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2023-02-28T11:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to link StateTables with state_current&gt;profile of an object?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556432#M59921</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/19823/joukyd.html" nodeid="19823"&gt;@Jouky D&lt;/A&gt;, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.&lt;/P&gt;&lt;P&gt;If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Mar 2023 19:05:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556432#M59921</guid>
      <dc:creator>andrew_o2</dc:creator>
      <dc:date>2023-03-03T19:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to link StateTables with state_current&gt;profile of an object?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556433#M59922</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Thank you Felix for your answer. But is there a way to set the state_current table as a created State Table? Or do I have to copy and paste that table into the state_current/profile in every object?
&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Mar 2023 07:39:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556433#M59922</guid>
      <dc:creator>jouky_d</dc:creator>
      <dc:date>2023-03-06T07:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to link StateTables with state_current&gt;profile of an object?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556434#M59923</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;You can of course copy the names over by code.&lt;/P&gt;&lt;PRE&gt;Object object;
treenode stateProfile = object.stats.state(0).profile;
Table stateTable = Table("tableName");
int maxRowNum = Math.min(stateTable.numRows, getbundlenrentries(stateProfile)-1);
for(int row = 1; row &amp;lt;= maxRowNum; row++)
{
&amp;nbsp; &amp;nbsp; setbundlevalue(stateProfile, row, 0, stateTable[row][2]);
}&lt;/PRE&gt;&lt;P&gt;This will change the profile names of &lt;EM&gt;object. &lt;/EM&gt;If you have references to all objects this should be applied to, you can use a for-loop to do this for all at once.&lt;/P&gt;&lt;P&gt;(The code assumes that the state table contains entries for all states 1-X in ascending order)&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Mar 2023 08:16:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-link-statetables-with-state-current-gt-profile-of-an/m-p/13556434#M59923</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2023-03-06T08:16:50Z</dc:date>
    </item>
  </channel>
</rss>

