<?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 Is it possible to set token colors in Process flow visualisation using values in a table? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-token-colors-in-process-flow-visualisation/m-p/13540006#M47005</link>
    <description>&lt;P&gt;&lt;I&gt;[ FlexSim 16.2.1 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I have a model where I have different itemtypes drawn in different colors or actually the objects change to the color of the itemtype of the item that is within them. I have a process flow that controls the model and sets the colors of objects based on a color table. See the attached simplified example model &lt;A href="https://answers.flexsim.com/storage/attachments/3394-colortest.fsm"&gt;colortest.fsm&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;To be able to better track how the tokens correspond to the 3D model I would like the tokens to use the same colors as are defined in the colors table. Thus I would see which token corresponds to what objects in the 3D model. In the test model this is easy as there are only 3 colors so I can set them manually to be the same colors. &lt;/P&gt;&lt;P&gt;Is there some way of setting the colors of the tokens so that I could use it in my real model that has around 60 different colors? Alternatively if someone can tell me where I can find the colors used by FlexSim (the FlexSim color palette) then I can probably use the same colors in the color table. This would reverse the problem, but be a solution also.&lt;/P&gt;&lt;P&gt;The colors I want to access are the ones defined with "Define legend" as seen in the image below. I tried to dig in the model tree to find where the colors are defined but I could not find them. Anyone that has a clue where they are in the tree? If I find them I guess I can change them and add more as required.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3395-idsbe.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1494424i5640ABB6B6265E4A/image-size/large?v=v2&amp;amp;px=999" role="button" title="3395-idsbe.png" alt="3395-idsbe.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Axel&lt;/P&gt;</description>
    <pubDate>Fri, 28 Oct 2016 07:22:18 GMT</pubDate>
    <dc:creator>axel_kohonen</dc:creator>
    <dc:date>2016-10-28T07:22:18Z</dc:date>
    <item>
      <title>Is it possible to set token colors in Process flow visualisation using values in a table?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-token-colors-in-process-flow-visualisation/m-p/13540006#M47005</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 16.2.1 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I have a model where I have different itemtypes drawn in different colors or actually the objects change to the color of the itemtype of the item that is within them. I have a process flow that controls the model and sets the colors of objects based on a color table. See the attached simplified example model &lt;A href="https://answers.flexsim.com/storage/attachments/3394-colortest.fsm"&gt;colortest.fsm&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;To be able to better track how the tokens correspond to the 3D model I would like the tokens to use the same colors as are defined in the colors table. Thus I would see which token corresponds to what objects in the 3D model. In the test model this is easy as there are only 3 colors so I can set them manually to be the same colors. &lt;/P&gt;&lt;P&gt;Is there some way of setting the colors of the tokens so that I could use it in my real model that has around 60 different colors? Alternatively if someone can tell me where I can find the colors used by FlexSim (the FlexSim color palette) then I can probably use the same colors in the color table. This would reverse the problem, but be a solution also.&lt;/P&gt;&lt;P&gt;The colors I want to access are the ones defined with "Define legend" as seen in the image below. I tried to dig in the model tree to find where the colors are defined but I could not find them. Anyone that has a clue where they are in the tree? If I find them I guess I can change them and add more as required.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3395-idsbe.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1494424i5640ABB6B6265E4A/image-size/large?v=v2&amp;amp;px=999" role="button" title="3395-idsbe.png" alt="3395-idsbe.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Axel&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 07:22:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-token-colors-in-process-flow-visualisation/m-p/13540006#M47005</guid>
      <dc:creator>axel_kohonen</dc:creator>
      <dc:date>2016-10-28T07:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to set token colors in Process flow visualisation using values in a table?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-token-colors-in-process-flow-visualisation/m-p/13540007#M47006</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Now I found the &lt;STRONG&gt;settokencolor&lt;/STRONG&gt; function which obviously solves the problem partially as I can set the color of the token to whatever color I desire. Just remove the color setting using itemtype from the process flow visualisation. The problem with this approach is that the colors of the child tokens have to be set separately as they will otherwise be the default color. Not sure how to solve this.&lt;/P&gt;&lt;P&gt;The sort of working model:&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.flexsim.com/storage/attachments/3396-colortest-works.fsm"&gt;colortest-works.fsm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Axel&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 07:32:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-token-colors-in-process-flow-visualisation/m-p/13540007#M47006</guid>
      <dc:creator>axel_kohonen</dc:creator>
      <dc:date>2016-10-28T07:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to set token colors in Process flow visualisation using values in a table?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-token-colors-in-process-flow-visualisation/m-p/13540008#M47007</link>
      <description>&lt;P&gt;Another option that I pointed to in the question is to use the colorarray function in FlexSim to get the colors that FlexSim uses and then enter these into the color array that the flowitems use and set a color label on the tokens that corresponds to this. This way we get the tokens and the flowitems to be the same color for easier debugging.&lt;/P&gt;&lt;P&gt;This is maybe not as flexible as one has to use the colors defined in FlexSim, but it works. A script to get the RGB color values to the output console is below.&lt;/P&gt;&lt;P&gt;Axel&lt;/P&gt;&lt;PRE&gt;//create a queue
treenode queue = createinstance(node("MAIN:/project/library/fixedresources/Queue", model()), model());

clearconsole(); //clear the output console

//how many colors do we need?
int amountOfColors = 66;

for(int i = 1; i &amp;lt;= amountOfColors; i++){
    //set color to queue
    colorarray(queue, i);
    //get the colors from the queue
    double colorR = getcolorcomponent(queue,1);
    double colorG = getcolorcomponent(queue,2);
    double colorB = getcolorcomponent(queue,3);
    //print colors in the output console
    pf(colorR);pt(",");
    pf(colorG);pt(",");
    pf(colorB);
    pr();
}

//delete the queue
destroyobject(queue);
&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Nov 2016 08:25:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/is-it-possible-to-set-token-colors-in-process-flow-visualisation/m-p/13540008#M47007</guid>
      <dc:creator>axel_kohonen</dc:creator>
      <dc:date>2016-11-02T08:25:58Z</dc:date>
    </item>
  </channel>
</rss>

