<?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: Change Object Color using process flow in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490748#M8294</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;You are using an Object process flow that is attached to all the processors so you don't need to acquire a processor from the group or listen to events on the whole group or even match anything in the wait for event activities. Since you're using an Object flow a new instance of the flow is created for each processor attached and so you'll end up with one token per processor and you can simply refer to the attached processor using current. So I removed all the unnecessary activities and replaced all the references to token.EQ with current.&lt;/P&gt;&lt;P&gt;Secondly, your model has an issue where if you reset the model while the object has its color changed then the object will permanently be the new color. To avoid this I added the originalColor label to the processor and added an OnReset trigger to the processors to restore the object's color from the originalColor label.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/44461-changecolor-working.fsm" target="_blank"&gt;changecolor_working.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 01 Oct 2021 15:22:21 GMT</pubDate>
    <dc:creator>Matthew_Gillespie</dc:creator>
    <dc:date>2021-10-01T15:22:21Z</dc:date>
    <item>
      <title>Change Object Color using process flow</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490747#M8293</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 20.0.10 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi, how to not let all token flowing together, I have put several processors into a Group, and I've used match value to match token and 3D object. I'm using process flow Change Visual activity to change Processor color when on entry event, I want it to change back to its original color in &lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;on exit &lt;/SPAN&gt;event. Thank you.&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/44424-changecolor.fsm" target="_blank"&gt;ChangeColor.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Oct 2021 07:54:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490747#M8293</guid>
      <dc:creator>shanice_c</dc:creator>
      <dc:date>2021-10-01T07:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Change Object Color using process flow</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490748#M8294</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;You are using an Object process flow that is attached to all the processors so you don't need to acquire a processor from the group or listen to events on the whole group or even match anything in the wait for event activities. Since you're using an Object flow a new instance of the flow is created for each processor attached and so you'll end up with one token per processor and you can simply refer to the attached processor using current. So I removed all the unnecessary activities and replaced all the references to token.EQ with current.&lt;/P&gt;&lt;P&gt;Secondly, your model has an issue where if you reset the model while the object has its color changed then the object will permanently be the new color. To avoid this I added the originalColor label to the processor and added an OnReset trigger to the processors to restore the object's color from the originalColor label.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/44461-changecolor-working.fsm" target="_blank"&gt;changecolor_working.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Oct 2021 15:22:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490748#M8294</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2021-10-01T15:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Change Object Color using process flow</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490749#M8295</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi,&lt;A rel="user" href="https://answers.flexsim.com/users/87/matthew.g.html" nodeid="87"&gt;@Matthew Gillespie&lt;/A&gt; May I ask how do you get originalColor value in the label for the first time?&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1633229763591.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1507579iE003FCCDB7D33037/image-size/large?v=v2&amp;amp;px=999" role="button" title="1633229763591.png" alt="1633229763591.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;I set label first in order to get that value.&lt;span class="lia-inline-image-display-wrapper" image-alt="1633229891205.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1507580iC3F48F211E7D7B90/image-size/large?v=v2&amp;amp;px=999" role="button" title="1633229891205.png" alt="1633229891205.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;&lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;But in your attached model, I couldn't find how to get the rbga. I'm not sure if it's redundant to do this? &lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 03 Oct 2021 03:03:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490749#M8295</guid>
      <dc:creator>shanice_c</dc:creator>
      <dc:date>2021-10-03T03:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Change Object Color using process flow</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490750#M8296</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Try just current.color to get an array of values. &lt;/P&gt;&lt;P&gt;If this doesn’t work for you may get access by method &lt;A href="https://docs.flexsim.com/en/21.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/Object.html#Method-getProperty"&gt;getProperty&lt;/A&gt;. &lt;BR /&gt;Please look into the tree. If the structure seems to be a container with subnodes, you can make them to an array by method.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="flexscript-class-treenode.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1507581iD1E2BD42533F1CE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="flexscript-class-treenode.png" alt="flexscript-class-treenode.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Naturally current is replaced by a reference to the color container node.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 03 Oct 2021 07:21:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490750#M8296</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2021-10-03T07:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change Object Color using process flow</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490751#M8297</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/30618/shanicec.html" nodeid="30618"&gt;@Fiona C&lt;/A&gt; &lt;/P&gt;&lt;P&gt;I opened the script window and ran some code like this to store the object's color on a label:&lt;/P&gt;&lt;PRE&gt;Object processor = Model.find("Processor1");
processor.originalColor = processor.color.as(Array);&lt;/PRE&gt;&lt;P&gt;You don't want to set the label in On Reset. If you do that you're going to override the object's original color with its current color, which defeats the purpose of storing off the object's original color in the first place. &lt;/P&gt;&lt;P&gt;Think about this situation: &lt;/P&gt;&lt;OL&gt;&lt;LI&gt; You run the model until the processor changes to lime green.&lt;/LI&gt;&lt;LI&gt; You reset the model. (The processor is still lime green)&lt;/LI&gt;&lt;LI&gt; In On Reset you take processor's current color (lime green) and store that on the processor's originalColor label.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The originalColor label is now lime green and the processor will never change to any other color.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 Oct 2021 16:27:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490751#M8297</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2021-10-04T16:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Change Object Color using process flow</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490752#M8298</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;A rel="user" href="https://answers.flexsim.com/users/87/matthew.g.html" nodeid="87"&gt;@Matthew Gillespie&lt;/A&gt; Thanks for your detailed explanation. I could understand how this works.
&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 Oct 2021 10:36:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/change-object-color-using-process-flow/m-p/13490752#M8298</guid>
      <dc:creator>shanice_c</dc:creator>
      <dc:date>2021-10-05T10:36:15Z</dc:date>
    </item>
  </channel>
</rss>

