<?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: Automating Model Creation and Buffer Transfer via Script in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/automating-model-creation-and-buffer-transfer-via-script/m-p/13602295#M95705</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/44322/adak-romero.html" nodeid="44322"&gt;@Adak_Romero&lt;/A&gt;,so far you cannot generate a process flow logic chart by code. You can add 3D flow connections into a model. It is possible by command &lt;A rel="noopener noreferrer" href="https://docs.flexsim.com/en/23.2/Reference/CodingInFlexSim/CommandReference/Commands.html#contextdragconnection" target="_blank"&gt;contextdragconnection&lt;/A&gt;. There are some restrictions if you connect module objects like conveyors.&lt;/P&gt;&lt;P&gt;Code based logic is a totally different aspect. Internally you put string data into a node and make this node later to a script node. Alternatively you can manipulate a stored model in XML format.&lt;BR /&gt;There is always a really large “BUT“. At some point you need to reset your model. And there is not a single command to achieve this internally from inside a running model AND get your model run again.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Sat, 10 Aug 2024 06:20:27 GMT</pubDate>
    <dc:creator>joerg_vogel_HsH</dc:creator>
    <dc:date>2024-08-10T06:20:27Z</dc:date>
    <item>
      <title>Automating Model Creation and Buffer Transfer via Script</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/automating-model-creation-and-buffer-transfer-via-script/m-p/13602294#M95704</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 23.2.0 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P id="isPasted"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="script-flexsim.jpg"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1524933i7FBC23549AD4B7C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="script-flexsim.jpg" alt="script-flexsim.jpg" /&gt;&lt;/span&gt;I need help writing a code that automatically generates a model from a script. So far, I’ve managed to create and position the elements, but now I need to configure a process where, through the code, the worker takes the pieces and transfers them to the buffer.&lt;/P&gt;
 &lt;P&gt;What can I do to achieve this through the code?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P id="isPasted"&gt;Object F1= createinstance(library().find("?Source"), model());&lt;/P&gt;
 &lt;P&gt;F1.setLocation(0,0,0);&lt;/P&gt;
 &lt;P&gt;F1.name="F1";&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Object M1 = createinstance(library().find("?Processor"), model());&lt;/P&gt;
 &lt;P&gt;M1.setLocation(0,10,0);&lt;/P&gt;
 &lt;P&gt;M1.name="Daria";&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Object M2 = createinstance(library().find("?Queue"), model());&lt;/P&gt;
 &lt;P&gt;M2.setLocation(0,20,0);&lt;/P&gt;
 &lt;P&gt;M2.name="Buffer";&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Object S1 = Object.create("Sink");&lt;/P&gt;
 &lt;P&gt;S1.setLocation(0,30,0);&lt;/P&gt;
 &lt;P&gt;S1.name="Salida";&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;objectconnect(Model.find("F1"),Model.find("Daria"));&lt;/P&gt;
 &lt;P&gt;objectconnect(Model.find("Daria"),Model.find("Buffer"));&lt;/P&gt;
 &lt;P&gt;objectconnect(Model.find("Buffer"),Model.find("Salida"));&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Object T1= createinstance(library().find("?Operator"), model());&lt;/P&gt;
 &lt;P&gt;T1.setLocation(5,15,0);&lt;/P&gt;
 &lt;P&gt;T1.name="Trabajador";&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Aug 2024 22:06:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/automating-model-creation-and-buffer-transfer-via-script/m-p/13602294#M95704</guid>
      <dc:creator>Adak_Romero</dc:creator>
      <dc:date>2024-08-09T22:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Automating Model Creation and Buffer Transfer via Script</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/automating-model-creation-and-buffer-transfer-via-script/m-p/13602295#M95705</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/44322/adak-romero.html" nodeid="44322"&gt;@Adak_Romero&lt;/A&gt;,so far you cannot generate a process flow logic chart by code. You can add 3D flow connections into a model. It is possible by command &lt;A rel="noopener noreferrer" href="https://docs.flexsim.com/en/23.2/Reference/CodingInFlexSim/CommandReference/Commands.html#contextdragconnection" target="_blank"&gt;contextdragconnection&lt;/A&gt;. There are some restrictions if you connect module objects like conveyors.&lt;/P&gt;&lt;P&gt;Code based logic is a totally different aspect. Internally you put string data into a node and make this node later to a script node. Alternatively you can manipulate a stored model in XML format.&lt;BR /&gt;There is always a really large “BUT“. At some point you need to reset your model. And there is not a single command to achieve this internally from inside a running model AND get your model run again.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 10 Aug 2024 06:20:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/automating-model-creation-and-buffer-transfer-via-script/m-p/13602295#M95705</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2024-08-10T06:20:27Z</dc:date>
    </item>
  </channel>
</rss>

