<?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: Update objects in financial analysis in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/update-objects-in-financial-analysis/m-p/13600837#M94616</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;You can often times find useful information by 'exploring' GUI elements.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1745583088915.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1527332iDB537BD601506237/image-size/large?v=v2&amp;amp;px=999" role="button" title="1745583088915.png" alt="1745583088915.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It takes a bit of experience, but you can find out what code is executed when certain GUI elements are pressed and then just use that code yourself.&lt;/P&gt;&lt;P&gt;In this case, we can find that there is a "function_s"-call to add objects to the chart. The "focus" here is the chart object.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1745583198034.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1527333i5B08785D02040D47/image-size/large?v=v2&amp;amp;px=999" role="button" title="1745583198034.png" alt="1745583198034.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;At to remove objects, the code also just deletes the link-nodes from the chart's tree.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1745583293173.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1527334iB1402DCD9236E662/image-size/large?v=v2&amp;amp;px=999" role="button" title="1745583293173.png" alt="1745583293173.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In both cases the code also calls "onchangeobjectset" on the class object. I don't know if that is important to do but probably can't hurt to do as well.&lt;/P&gt;&lt;P&gt;So in summary:&lt;/P&gt;&lt;PRE&gt;Object chart = Model.find("Tools/Statistics/Financial Analysis");&lt;BR /&gt;Object te = ...;

// Adding
function_s(chart, "addMember", te);
function_s(classobject(chart), "onchangeobjectset", chart);

// Removing
treenode objects = getvarnode(chart, "objects");
for(int i = 1; i &amp;lt;= objects.subnodes.length; i++) {
&amp;nbsp; &amp;nbsp; if(ownerobject(objects.subnodes&lt;I&gt;.value) == te) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; objects.subnodes&lt;I&gt;.destroy();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&amp;nbsp; &amp;nbsp; }
}&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 25 Apr 2025 12:18:37 GMT</pubDate>
    <dc:creator>moehlmann_fe</dc:creator>
    <dc:date>2025-04-25T12:18:37Z</dc:date>
    <item>
      <title>Update objects in financial analysis</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/update-objects-in-financial-analysis/m-p/13600836#M94615</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 25.0.3 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P id="isPasted"&gt;Hello, I need help modifying the objects considered in the financial analysis graph, which are trucks (Camiones) in my real model. I've attached an example with the problem to be solved.&lt;/P&gt;
 &lt;P&gt;Basically, in my model, I use a parameter (Camiones_XL) to define the number of active trucks to be considered during the simulation, and I have a trigger On Model Reset that updates the members of the active truck group ("Group_Camiones_XL") by taking resources from the "Group_Camiones_XL_MAX" group, which contains the maximum number of trucks. (I do this because I need a model which could be used without a license)&lt;/P&gt;
 &lt;P&gt;My problem is that the objects in the financial analysis graph aren't updated based on the active trucks group. Unfortunately, the "sampler" doesn't run for groups, and I'm not sure if it's recommended to destroy and create new nodes through the model tree.&lt;/P&gt;
 &lt;P&gt;Could someone explain me how to solve this? &lt;/P&gt;
 &lt;P&gt;Thanks in advance.&lt;span class="lia-inline-image-display-wrapper" image-alt="objectfinancialanalysischart-dummy.jpg"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1527335i82B3886CDAADE8C3/image-size/large?v=v2&amp;amp;px=999" role="button" title="objectfinancialanalysischart-dummy.jpg" alt="objectfinancialanalysischart-dummy.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 25 Apr 2025 11:50:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/update-objects-in-financial-analysis/m-p/13600836#M94615</guid>
      <dc:creator>carmen_fernandez7YE4Y</dc:creator>
      <dc:date>2025-04-25T11:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Update objects in financial analysis</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/update-objects-in-financial-analysis/m-p/13600837#M94616</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;You can often times find useful information by 'exploring' GUI elements.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1745583088915.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1527332iDB537BD601506237/image-size/large?v=v2&amp;amp;px=999" role="button" title="1745583088915.png" alt="1745583088915.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It takes a bit of experience, but you can find out what code is executed when certain GUI elements are pressed and then just use that code yourself.&lt;/P&gt;&lt;P&gt;In this case, we can find that there is a "function_s"-call to add objects to the chart. The "focus" here is the chart object.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1745583198034.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1527333i5B08785D02040D47/image-size/large?v=v2&amp;amp;px=999" role="button" title="1745583198034.png" alt="1745583198034.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;At to remove objects, the code also just deletes the link-nodes from the chart's tree.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1745583293173.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1527334iB1402DCD9236E662/image-size/large?v=v2&amp;amp;px=999" role="button" title="1745583293173.png" alt="1745583293173.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In both cases the code also calls "onchangeobjectset" on the class object. I don't know if that is important to do but probably can't hurt to do as well.&lt;/P&gt;&lt;P&gt;So in summary:&lt;/P&gt;&lt;PRE&gt;Object chart = Model.find("Tools/Statistics/Financial Analysis");&lt;BR /&gt;Object te = ...;

// Adding
function_s(chart, "addMember", te);
function_s(classobject(chart), "onchangeobjectset", chart);

// Removing
treenode objects = getvarnode(chart, "objects");
for(int i = 1; i &amp;lt;= objects.subnodes.length; i++) {
&amp;nbsp; &amp;nbsp; if(ownerobject(objects.subnodes&lt;I&gt;.value) == te) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; objects.subnodes&lt;I&gt;.destroy();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&amp;nbsp; &amp;nbsp; }
}&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 25 Apr 2025 12:18:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/update-objects-in-financial-analysis/m-p/13600837#M94616</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2025-04-25T12:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Update objects in financial analysis</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/update-objects-in-financial-analysis/m-p/13603486#M95784</link>
      <description>&lt;P&gt;This is a new world for me, but I think it's time to jump in and keep moving forward &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp; I've modified the trigger with the fuctions you mentioned and it works! Thank you so much for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 09:10:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/update-objects-in-financial-analysis/m-p/13603486#M95784</guid>
      <dc:creator>carmen_fernandez7YE4Y</dc:creator>
      <dc:date>2025-04-28T09:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update objects in financial analysis</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/update-objects-in-financial-analysis/m-p/13769975#M97647</link>
      <description>&lt;P&gt;Do you know how to do the same but for a distance traveled chart, for example? I tried to use the same logic by exploring the structure and using the commands there, but it isn't working.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Aug 2025 10:29:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/update-objects-in-financial-analysis/m-p/13769975#M97647</guid>
      <dc:creator>afonsorios_viana</dc:creator>
      <dc:date>2025-08-16T10:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Update objects in financial analysis</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/update-objects-in-financial-analysis/m-p/13771466#M97654</link>
      <description>&lt;P&gt;The travel distance chart stores the attached objects in a group. Adding task executers to that group will make them appear in the chart after the next model reset.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="moehlmann_fe_1-1755498479288.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1562008i6FDD743914E62BC9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="moehlmann_fe_1-1755498479288.png" alt="moehlmann_fe_1-1755498479288.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Group objects = Model.find("Tools/ChartTemplates/Travel Distance&amp;gt;stats/primaryGroup/primaryGroup");
objects.addMember(Model.find("Operator1"));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To track transient objects (TE's that are created and destroyed during the model run) you can use a custom Statistics Collector instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 06:29:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/update-objects-in-financial-analysis/m-p/13771466#M97654</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2025-08-18T06:29:41Z</dc:date>
    </item>
  </channel>
</rss>

