<?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 Using Color Pallette for State Charts in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/using-color-pallette-for-state-charts/m-p/13549802#M54729</link>
    <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.1.4 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I want to set up a standard list of colors for all my State Charts. It really bugs me that two charts next to each-other can have a totally different set of colors for "idle" or "processing" etc., and the only way I can find to change colors is to laboriously go into &lt;U&gt;every&lt;/U&gt; color on &lt;U&gt;every&lt;/U&gt; chart and change it manually.&lt;/P&gt;&lt;P&gt;I am using Color Pallettes for colors on other charts, e.g. Milestone charts, but I don't see any way to choose a color pallette for the standard State Chart templates.&lt;/P&gt;&lt;P&gt;Does anyone know how to do it?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 02 Aug 2021 20:00:40 GMT</pubDate>
    <dc:creator>clairekruppGhafari</dc:creator>
    <dc:date>2021-08-02T20:00:40Z</dc:date>
    <item>
      <title>Using Color Pallette for State Charts</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/using-color-pallette-for-state-charts/m-p/13549802#M54729</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.1.4 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I want to set up a standard list of colors for all my State Charts. It really bugs me that two charts next to each-other can have a totally different set of colors for "idle" or "processing" etc., and the only way I can find to change colors is to laboriously go into &lt;U&gt;every&lt;/U&gt; color on &lt;U&gt;every&lt;/U&gt; chart and change it manually.&lt;/P&gt;&lt;P&gt;I am using Color Pallettes for colors on other charts, e.g. Milestone charts, but I don't see any way to choose a color pallette for the standard State Chart templates.&lt;/P&gt;&lt;P&gt;Does anyone know how to do it?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 02 Aug 2021 20:00:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/using-color-pallette-for-state-charts/m-p/13549802#M54729</guid>
      <dc:creator>clairekruppGhafari</dc:creator>
      <dc:date>2021-08-02T20:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using Color Pallette for State Charts</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/using-color-pallette-for-state-charts/m-p/13549803#M54730</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;In the 21.2 Beta the color tab was added to the state chart template, allowing you to use palettes the same way as in other charts.&lt;/P&gt;&lt;P&gt;In 21.1 you can still make the chart use a custom palette by assigning it to the "palette" node in the charts variables in the tree. Insert the name of the chart and palette and run the following code in the script window.&lt;/P&gt;&lt;PRE&gt;string chartName = "&amp;lt;Name of the chart&amp;gt;";
string paletteName = "&amp;lt;Name of the palette&amp;gt;";

treenode chartPalette = Model.find("/Tools/Statistics/" + chartName + "&amp;gt;variables/palette");
treenode statePalette = Model.find("/Tools/ColorPalettes/" + paletteName);
chartPalette.value = statePalette;&lt;/PRE&gt;&lt;P&gt;This will take priority over the internal palette of the chart. &lt;/P&gt;&lt;P&gt;The custom palette should be formatted like in the picture; the order of the states does not matter, states that are missing from the palette will be filled in automatically the first time the chart is populated.&lt;/P&gt;&lt;P&gt;Note that the properties of the chart still shows the internal palette, but the colors used are the custom ones.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="customstatepalette.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1506894iB37A3ABDA0390364/image-size/large?v=v2&amp;amp;px=999" role="button" title="customstatepalette.png" alt="customstatepalette.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Addendum: I also tried overwriting the color values of the internal palette via code, but ran into issues with the alpha value staying at/resetting back to the default value. This can be circumvented by having the properties open when assigning the new colors and clicking on each color after running the code to properly update it. As this would still be a lot of work if you have a lot of charts the method above seems to be the easier one. &lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Aug 2021 08:29:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/using-color-pallette-for-state-charts/m-p/13549803#M54730</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2021-08-03T08:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using Color Pallette for State Charts</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/using-color-pallette-for-state-charts/m-p/13549804#M54731</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Thank you &lt;A rel="user" href="https://answers.flexsim.com/users/19365/felixmh.html" nodeid="19365"&gt;@Felix Möhlmann&lt;/A&gt; , that doesn't look too hard!&lt;P&gt;To clarify, I only need to do this once for each chart, and then save the model and the new pallette will stay?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Looking forward to 21.2!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Aug 2021 12:46:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/using-color-pallette-for-state-charts/m-p/13549804#M54731</guid>
      <dc:creator>clairekruppGhafari</dc:creator>
      <dc:date>2021-08-03T12:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Color Pallette for State Charts</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/using-color-pallette-for-state-charts/m-p/13549805#M54732</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Yes, in my tests the custom color palette persisted through saving and reloading.&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Aug 2021 15:42:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/using-color-pallette-for-state-charts/m-p/13549805#M54732</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2021-08-03T15:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Color Pallette for State Charts</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/using-color-pallette-for-state-charts/m-p/13549806#M54733</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Thank you!&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Aug 2021 18:42:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/using-color-pallette-for-state-charts/m-p/13549806#M54733</guid>
      <dc:creator>clairekruppGhafari</dc:creator>
      <dc:date>2021-08-03T18:42:49Z</dc:date>
    </item>
  </channel>
</rss>

