<?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: Write a usage time in a table in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520021#M31142</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hello &lt;A rel="user" href="https://answers.flexsim.com/users/32599/oscarc13.html" nodeid="32599"&gt;@Oscar C13&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You can use the code "getTotalTimeAt". For example:&lt;/P&gt;&lt;PRE&gt;Object P=Model.find("Processor1");
return P.stats.state().getTotalTimeAt(2);&lt;/PRE&gt;&lt;P&gt;You can find more examples in the forum: &lt;A href="https://answers.flexsim.com/questions/83520/how-to-get-the-collecting-time-of-a-process-flow-s.html"&gt;How to get the collecting time of a process flow Sink from its tree ? - FlexSim Community&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;I hope I have been helpful.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 14 Dec 2021 09:26:36 GMT</pubDate>
    <dc:creator>jose_antonio_mad</dc:creator>
    <dc:date>2021-12-14T09:26:36Z</dc:date>
    <item>
      <title>Write a usage time in a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520020#M31141</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.2.2 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I wanted to be able to write in a table, the time that a processor has been used, but I don´t know what code I have to use in the table to be able to refer to the processing time.&lt;/P&gt;
 &lt;P&gt;I did this but I don´t know if there is a better way.&lt;BR /&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/46928-processtimetable.fsm" target="_blank"&gt;ProcessTimeTable.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Dec 2021 08:59:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520020#M31141</guid>
      <dc:creator>oscar_c13</dc:creator>
      <dc:date>2021-12-14T08:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Write a usage time in a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520021#M31142</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hello &lt;A rel="user" href="https://answers.flexsim.com/users/32599/oscarc13.html" nodeid="32599"&gt;@Oscar C13&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You can use the code "getTotalTimeAt". For example:&lt;/P&gt;&lt;PRE&gt;Object P=Model.find("Processor1");
return P.stats.state().getTotalTimeAt(2);&lt;/PRE&gt;&lt;P&gt;You can find more examples in the forum: &lt;A href="https://answers.flexsim.com/questions/83520/how-to-get-the-collecting-time-of-a-process-flow-s.html"&gt;How to get the collecting time of a process flow Sink from its tree ? - FlexSim Community&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;I hope I have been helpful.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Dec 2021 09:26:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520021#M31142</guid>
      <dc:creator>jose_antonio_mad</dc:creator>
      <dc:date>2021-12-14T09:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Write a usage time in a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520022#M31143</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I have two solutions added. I evaluate the staytime twice: first in Processfinish trigger, second by Process Flow:&lt;/P&gt;&lt;PRE&gt;Model.time-getentrytime(item) // Trigger value for a new row
Model.time-getentrytime(token.item) // Process Flow for a new row value &lt;/PRE&gt;&lt;P&gt;Second solution: a label at processor sets a process time&lt;/P&gt;&lt;P&gt;I read this label value. I need a reference to involved processor which I assign in previous event driven source activity to a token label: &lt;CODE&gt;&lt;STRONG&gt;token&lt;/STRONG&gt;.Processor&lt;/CODE&gt;&lt;/P&gt;&lt;PRE&gt;token.Processor.myCurrentProcessTime // read label value for a new row&lt;/PRE&gt;&lt;P&gt;You will choose a template in a trigger or in Process Flow for a Custom Code activity&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="addrowandvalueglobaltable.jpg"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508433i640E86C6E2F26C19/image-size/large?v=v2&amp;amp;px=999" role="button" title="addrowandvalueglobaltable.jpg" alt="addrowandvalueglobaltable.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/46941-getstaytimeprocessor.fsm" target="_blank"&gt;getStaytimeProcessor.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Dec 2021 09:43:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520022#M31143</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2021-12-14T09:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Write a usage time in a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520023#M31144</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Thanks, I understand, &lt;BR /&gt;but if I put this code in the "Code Editor" it doesn´t work well. &lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/46929-processtimetable.fsm" target="_blank"&gt;ProcessTimeTable.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Dec 2021 09:43:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520023#M31144</guid>
      <dc:creator>oscar_c13</dc:creator>
      <dc:date>2021-12-14T09:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Write a usage time in a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520024#M31145</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;In Global Table Quick Properties you can add a behavior what happens &lt;EM&gt;On Reset&lt;/EM&gt;. I have chosen "delete all rows".&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Dec 2021 10:28:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520024#M31145</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2021-12-14T10:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Write a usage time in a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520025#M31146</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;This codeI posted is the same used by statistic collector. However, you don't use the same code I sent to you (&lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;P.stats.state().getTotalTimeAt(2)&lt;/SPAN&gt; ), you use &lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;P.stats.state().getTotalTimeAt("2")&lt;/SPAN&gt; . You use a text, that is the reason why your model does not work.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Dec 2021 10:41:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/write-a-usage-time-in-a-table/m-p/13520025#M31146</guid>
      <dc:creator>jose_antonio_mad</dc:creator>
      <dc:date>2021-12-14T10:41:23Z</dc:date>
    </item>
  </channel>
</rss>

