<?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 access tracked variable statistics in code in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-access-tracked-variable-statistics-in-code/m-p/13539556#M46664</link>
    <description>&lt;P&gt;Starting in FlexSim 2017 Update 1 you can use the TrackedVariable class. Then the code is even simpler:&lt;/P&gt;&lt;PRE&gt;TrackedVariable("vPiecesReplenished").value //Current value&lt;/PRE&gt;&lt;P&gt;The TrackedVariable class also includes methods for getting the average, maximum, minimum, etc.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2017 16:29:31 GMT</pubDate>
    <dc:creator>matt_long</dc:creator>
    <dc:date>2017-07-27T16:29:31Z</dc:date>
    <item>
      <title>How to access tracked variable statistics in code</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-access-tracked-variable-statistics-in-code/m-p/13539553#M46661</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 16.2.2 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;I am using tracked variables to gather statistics in my model. One is of type Level, used to count the number of pieces moved; the second is of type Time series. &lt;/P&gt;
&lt;P&gt;I would like to access the Min/Avg/Max values in code using getstat(), similar to how I can with any PF Activity, e.g., getstat(trackedvariable("vPiecesReplenished"),"Content", STAT_CURRENT);&lt;/P&gt;
&lt;P&gt;However this returns 3.4E38 (i.e., unknown value).&lt;/P&gt;
&lt;P&gt;(For a PF activity I use getstat(getactivity("ProcessFlow", sActivity), sStatistic, STAT_CURRENT)&lt;/P&gt;
&lt;P&gt;I'm guessing that "Content" is not the right statistic name? What names should I use, or is there a different command? Or is it possible at all?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Craig&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 17:29:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-access-tracked-variable-statistics-in-code/m-p/13539553#M46661</guid>
      <dc:creator>craig_dickson</dc:creator>
      <dc:date>2017-07-26T17:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to access tracked variable statistics in code</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-access-tracked-variable-statistics-in-code/m-p/13539554#M46662</link>
      <description>&lt;P&gt;Give an empty string as the name:&lt;/P&gt;&lt;PRE&gt;getstat(trackedvariable("vPiecesReplenished"),"", STAT_CURRENT);&lt;/PRE&gt;&lt;P&gt;Normally you have to specify which statistic you want from the given object, but a tracked variable is the statistic.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 21:38:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-access-tracked-variable-statistics-in-code/m-p/13539554#M46662</guid>
      <dc:creator>Jacob_Gillespie</dc:creator>
      <dc:date>2017-07-26T21:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to access tracked variable statistics in code</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-access-tracked-variable-statistics-in-code/m-p/13539555#M46663</link>
      <description>&lt;P&gt;Thanks. I like easy answers &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 00:50:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-access-tracked-variable-statistics-in-code/m-p/13539555#M46663</guid>
      <dc:creator>craig_dickson</dc:creator>
      <dc:date>2017-07-27T00:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to access tracked variable statistics in code</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-access-tracked-variable-statistics-in-code/m-p/13539556#M46664</link>
      <description>&lt;P&gt;Starting in FlexSim 2017 Update 1 you can use the TrackedVariable class. Then the code is even simpler:&lt;/P&gt;&lt;PRE&gt;TrackedVariable("vPiecesReplenished").value //Current value&lt;/PRE&gt;&lt;P&gt;The TrackedVariable class also includes methods for getting the average, maximum, minimum, etc.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 16:29:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-access-tracked-variable-statistics-in-code/m-p/13539556#M46664</guid>
      <dc:creator>matt_long</dc:creator>
      <dc:date>2017-07-27T16:29:31Z</dc:date>
    </item>
  </channel>
</rss>

