<?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: buildall() cannnot be called in reset trigger in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/buildall-cannnot-be-called-in-reset-trigger/m-p/13523104#M33537</link>
    <description>&lt;P&gt;Thanks for the suggestion Phil.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jun 2017 16:35:00 GMT</pubDate>
    <dc:creator>haozhou88FBM</dc:creator>
    <dc:date>2017-06-07T16:35:00Z</dc:date>
    <item>
      <title>buildall() cannnot be called in reset trigger</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/buildall-cannnot-be-called-in-reset-trigger/m-p/13523101#M33534</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 17.1.1 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;I recently noticed that buildall() command cannot be called in reset trigger. I am using 17.1.1 engine. I guess we have the problem since 17.0 engine. In some of my old models, I was trying to overwrite some trigger scripts in model reset trigger, that is why I need to call buildall() command after script updating.&lt;/P&gt;
&lt;P&gt;The problem can be duplicated by two ways:&lt;/P&gt;
&lt;P&gt;1. Create a brand new model. Open model on reset trigger. Write code buildall() and click apply. Then hit reset. FlexSim will try to compile the model even there is no any C code in the model. See attached image.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="6962-1.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1495522i08189E9454F4D221/image-size/large?v=v2&amp;amp;px=999" role="button" title="6962-1.png" alt="6962-1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. Create a brand new model. Drag a random object. Open object's on reset trigger. Write code buildall() and click apply. Then hit reset. You can obverse the same problem.&lt;/P&gt;
&lt;P&gt;Could you provide suggestions of fixing this problem?&lt;/P&gt;
&lt;P&gt;Thanks, Hao&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 16:08:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/buildall-cannnot-be-called-in-reset-trigger/m-p/13523101#M33534</guid>
      <dc:creator>haozhou88FBM</dc:creator>
      <dc:date>2017-06-06T16:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: buildall() cannnot be called in reset trigger</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/buildall-cannnot-be-called-in-reset-trigger/m-p/13523102#M33535</link>
      <description>&lt;P&gt;It looks like no matter where you call the buildall() command, FlexSim needs to compile the model.  My guess is FlexSim is using some uncompiled C++ code when it tries to execute the buildall() command, so I bet this is a bug.  I will pass it along to the developers and it should hopefully get resolved in our next bug release.&lt;/P&gt;&lt;P&gt;In the meantime, you can try using the buildnodeflexscript() command.  It is similar to the buildall() command, except you need to pass in a reference to a specific FlexScript node for it to build.  It sounds like you are already changing specific nodes in your code, so you just need to call buildnodeflexscript right after changing a FlexScript node and pass in a reference to that node.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 18:28:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/buildall-cannnot-be-called-in-reset-trigger/m-p/13523102#M33535</guid>
      <dc:creator>logan_gold</dc:creator>
      <dc:date>2017-06-06T18:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: buildall() cannnot be called in reset trigger</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/buildall-cannnot-be-called-in-reset-trigger/m-p/13523103#M33536</link>
      <description>&lt;P&gt;buildnodeflexscript() is also recursive, so you can pass model() to build all the FlexScript code in the model:&lt;/P&gt;&lt;PRE&gt;buildnodeflexscript(model());&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jun 2017 15:53:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/buildall-cannnot-be-called-in-reset-trigger/m-p/13523103#M33536</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2017-06-07T15:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: buildall() cannnot be called in reset trigger</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/buildall-cannnot-be-called-in-reset-trigger/m-p/13523104#M33537</link>
      <description>&lt;P&gt;Thanks for the suggestion Phil.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 16:35:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/buildall-cannnot-be-called-in-reset-trigger/m-p/13523104#M33537</guid>
      <dc:creator>haozhou88FBM</dc:creator>
      <dc:date>2017-06-07T16:35:00Z</dc:date>
    </item>
  </channel>
</rss>

