<?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 refresh GUI window? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569616#M70272</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The main problem is that you are changing the FlexScript code then are not building it. When you change a treenode that has FlexScript data, you must then Build the Node FlexScript or Build All FlexScript in order for your changes to be complied. (This is done when you hit Save) You can add a Build FlexScript button to your toolbar in Global Preferences &amp;gt; Customize Toolbar, or you can right click on a treenode and select Build &amp;gt; Build Node FlexScript. But I'd recommend that you use the buildnodeflexscript() command. I ran this script which uses that command and I referenced the Col2Units node in the GUI, and the cell changed to the correct color in "bgColor" whenever I ran the script. &lt;/P&gt;&lt;PRE&gt;buildnodeflexscript(Model.find("MODEL:/Tools/GUIs/test/table2&amp;gt;style/FS_CELL_FORMATTING/Col2Units"));
Object gui = Model.find("MODEL:/Tools/GUIs/test");
refreshview(gui);&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 07 Aug 2023 20:36:27 GMT</pubDate>
    <dc:creator>jonah_kendellR47TC</dc:creator>
    <dc:date>2023-08-07T20:36:27Z</dc:date>
    <item>
      <title>How to refresh GUI window?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569613#M70269</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 23.1.0 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi,&lt;/P&gt;
 &lt;P&gt;I have a model with custom GUI, where I have a reference to GlobalTable. Through this GUI I am able to change GlobalTable's cell color based on value change. This is done without a problem, the cell's color changes, but the visual part is not affected. Even if I press the F5 to refresh the GUI. What I have to do is to save the model and then press the F5 button and the color changes.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Is there any command to do this as it is for combobox (refreshcombobox)?&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Thank you,&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Martin&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Aug 2023 09:54:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569613#M70269</guid>
      <dc:creator>martin_k5</dc:creator>
      <dc:date>2023-08-07T09:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to refresh GUI window?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569614#M70270</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Have you tried repaintview() and refreshview() ?&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Aug 2023 10:43:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569614#M70270</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2023-08-07T10:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to refresh GUI window?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569615#M70271</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Yes, I have tried that, but without improvement. &lt;/P&gt;
 &lt;P&gt;The desired goal:&lt;/P&gt;
 &lt;UL&gt;&lt;LI&gt;- to open model and see the GUI (one cell should be colored)&lt;/LI&gt;&lt;LI&gt;- then to change the cell's color and based on some action (command) refresh the view and see the changed color in the cell &lt;/LI&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1691410929277.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1518847iE5B56103191F6000/image-size/large?v=v2&amp;amp;px=999" role="button" title="1691410929277.png" alt="1691410929277.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/UL&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;I am also attaching the model if you would be able to help me more?&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Thank you,&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Martin&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/72278-colorgt-demo.fsm" target="_blank"&gt;ColorGT_demo.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Aug 2023 12:23:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569615#M70271</guid>
      <dc:creator>martin_k5</dc:creator>
      <dc:date>2023-08-07T12:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to refresh GUI window?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569616#M70272</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The main problem is that you are changing the FlexScript code then are not building it. When you change a treenode that has FlexScript data, you must then Build the Node FlexScript or Build All FlexScript in order for your changes to be complied. (This is done when you hit Save) You can add a Build FlexScript button to your toolbar in Global Preferences &amp;gt; Customize Toolbar, or you can right click on a treenode and select Build &amp;gt; Build Node FlexScript. But I'd recommend that you use the buildnodeflexscript() command. I ran this script which uses that command and I referenced the Col2Units node in the GUI, and the cell changed to the correct color in "bgColor" whenever I ran the script. &lt;/P&gt;&lt;PRE&gt;buildnodeflexscript(Model.find("MODEL:/Tools/GUIs/test/table2&amp;gt;style/FS_CELL_FORMATTING/Col2Units"));
Object gui = Model.find("MODEL:/Tools/GUIs/test");
refreshview(gui);&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Aug 2023 20:36:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569616#M70272</guid>
      <dc:creator>jonah_kendellR47TC</dc:creator>
      <dc:date>2023-08-07T20:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to refresh GUI window?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569617#M70273</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Thank you for your detailed answer. I did not know about this and it works. It solved the problem when you change manually/by code the treenode's FlexScritp and you want to see the desired change in the GUI. But what if I have dashboard with GUI class and change the treenode? As I do so, the GUI class in dashboard does not show the change only the freshly opened GUI (done by your code). &lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;I am also attaching the model, would you be so kind to help? &lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Thank you,&lt;/P&gt;
 &lt;P&gt;Martin&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/72327-colorgt-demo.fsm" target="_blank"&gt;ColorGT_demo.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Aug 2023 08:05:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569617#M70273</guid>
      <dc:creator>martin_k5</dc:creator>
      <dc:date>2023-08-08T08:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to refresh GUI window?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569618#M70274</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;For a dashboard table GUI, you need to refresh the dashboard widget. So in all, you'll need to build the Node FlexScript of the treenode you changed, get the Dashboard widget with getdashboardcontrol("your_gui_ID"), call the Refresh function on the ownerobject of the widget, then refresh the view.&lt;/P&gt;&lt;PRE&gt;buildnodeflexscript(Model.find("MODEL:/Tools/GUIs/test/table2&amp;gt;style/FS_CELL_FORMATTING/Col2Units"));
Object dash = getdashboardcontrol("gui_class"); 
function_s(ownerobject(dash), "refresh");
refreshview(dash);&lt;/PRE&gt;&lt;P&gt;I had to close your dashboard and open it again to get the Properties panel to focus on the widget so you can see the gui ID.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/72393-colorgt-demo-jk.fsm" target="_blank"&gt;colorgt-demo_JK.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Aug 2023 20:33:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569618#M70274</guid>
      <dc:creator>jonah_kendellR47TC</dc:creator>
      <dc:date>2023-08-08T20:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to refresh GUI window?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569619#M70275</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Hi,
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;sorry for late response. I ran your model and that is exactly what I was looking for. Still I have one question: Is is possible to deselect the GUI in dashboard after running the refresh command (the provided code)? &lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Thank you,&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Martin&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Aug 2023 07:00:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569619#M70275</guid>
      <dc:creator>martin_k5</dc:creator>
      <dc:date>2023-08-22T07:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to refresh GUI window?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569620#M70276</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A href="https://answers.flexsim.com/questions/149263/is-it-possible-to-deactivate-selection-in-dashboar.html?childToView=149278#answer-149278"&gt;new question here.&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Aug 2023 11:18:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-refresh-gui-window/m-p/13569620#M70276</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2023-08-23T11:18:54Z</dc:date>
    </item>
  </channel>
</rss>

