<?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: Dynamically disable/enable processflow sources in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/dynamically-disable-enable-processflow-sources/m-p/13482981#M2129</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;
 Thanks for your help, and thank you for linking the previous question - I did not find that in my search.
 &lt;P&gt;The Explore Structure tip also seems like a helpful starting point in lieu of the ability to record commands.&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 30 Mar 2022 17:14:49 GMT</pubDate>
    <dc:creator>thomas_smithWKC4J</dc:creator>
    <dc:date>2022-03-30T17:14:49Z</dc:date>
    <item>
      <title>Dynamically disable/enable processflow sources</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/dynamically-disable-enable-processflow-sources/m-p/13482978#M2126</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.1.5 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I have a model with a lot of ProcesFlow sources that I would like to enable and disable more easily. I am using a table which, on reset, will dynamically add all sources (if it finds "Source" in the activity's classes), remove any null values (if the source no longer exists), and syncs up the sources "enabled" variable to a value from the table (for example, setvarnum(activity, "enabled", 1)). &lt;/P&gt;
 &lt;P&gt;The reset trigger is functioning mostly as intended, and I can easily control the state of each source. The one thing it is not doing is updating the icon to show as disabled. See below for an example.&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1648655643198.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1509686i2D6FE6E91D8AC5A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="1648655643198.png" alt="1648655643198.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;span class="lia-inline-image-display-wrapper" image-alt="1648655695504.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1509687i0FD01ABBB6117845/image-size/large?v=v2&amp;amp;px=999" role="button" title="1648655695504.png" alt="1648655695504.png" /&gt;&lt;/span&gt;
 &lt;P&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Is there a way to automatically update the icon when I disable/enable a source? Similar to how it updates when enabling/disabling manually.&lt;/P&gt;
 &lt;P&gt;As a side question, is there a way to view/record what commands are being triggered when certain actions are performed? I'm envisioning something similar to how Excel has an ability to record macros. It looks like the event log only captures events triggered within the model run.&lt;/P&gt;
 &lt;P&gt;Thank you.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 30 Mar 2022 16:01:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/dynamically-disable-enable-processflow-sources/m-p/13482978#M2126</guid>
      <dc:creator>thomas_smithWKC4J</dc:creator>
      <dc:date>2022-03-30T16:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically disable/enable processflow sources</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/dynamically-disable-enable-processflow-sources/m-p/13482979#M2127</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;You need to call the source's updateIcon function:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;function_s&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;source&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 136, 0);"&gt;"updateIcon"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;See &lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/questions/90986/how-can-i-change-the-visual-of-a-source-by-flexscr.html" target="_blank"&gt;How can I change the visual of a source by FlexScript?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you use a parameter to enable/disable the source activities it automatically handles updating the icon:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1648658665527.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1509685i5C997494715F0209/image-size/large?v=v2&amp;amp;px=999" role="button" title="1648658665527.png" alt="1648658665527.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 30 Mar 2022 16:26:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/dynamically-disable-enable-processflow-sources/m-p/13482979#M2127</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2022-03-30T16:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically disable/enable processflow sources</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/dynamically-disable-enable-processflow-sources/m-p/13482980#M2128</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;We don't have a record macro ability, but you can view the structure of open views by right clicking on the view and selecting View - &amp;gt; Explore Structure. This is pretty advanced and probably not super helpful, but doing so will let you see that the Enabled checkbox has an OnPress node that calls the updateIcon function.&lt;/DIV&gt;</description>
      <pubDate>Wed, 30 Mar 2022 16:31:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/dynamically-disable-enable-processflow-sources/m-p/13482980#M2128</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2022-03-30T16:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically disable/enable processflow sources</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/dynamically-disable-enable-processflow-sources/m-p/13482981#M2129</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Thanks for your help, and thank you for linking the previous question - I did not find that in my search.
 &lt;P&gt;The Explore Structure tip also seems like a helpful starting point in lieu of the ability to record commands.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 30 Mar 2022 17:14:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/dynamically-disable-enable-processflow-sources/m-p/13482981#M2129</guid>
      <dc:creator>thomas_smithWKC4J</dc:creator>
      <dc:date>2022-03-30T17:14:49Z</dc:date>
    </item>
  </channel>
</rss>

