<?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 create and join AVG paths in flexscript in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-create-and-join-avg-paths-in-flexscript/m-p/13556889#M60270</link>
    <description>&lt;P&gt;You should call function_s(path, "finalizeSpatialChanges") after creating or moving an AGV path using code:&lt;/P&gt;&lt;PRE&gt;treenode path1 = createinstance(node("/AGV/StraightPath",library()),model());
treenode path2 = createinstance(node("/AGV/StraightPath",library()),model());
setsize(path1,3,1,1);
setsize(path2,8,1,1);
setloc(path1,1,0,0);
setloc(path2,5,1,0);
setrot(path2,0,0,90);
function_s(path1, "finalizeSpatialChanges");
function_s(path2, "finalizeSpatialChanges");
treenode from = path1;
treenode to = path2;
if (isclasstype(from, "AGV::Path") &amp;amp;&amp;amp; isclasstype(to, "AGV::Path")) {
    double distAlongFrom = 2.5;
    double distAlongTo = 0.16;
    treenode newPath = applicationcommand("Path_joinTo", from, to, distAlongFrom, distAlongTo);
}
&lt;/PRE&gt;</description>
    <pubDate>Mon, 12 Dec 2016 23:56:35 GMT</pubDate>
    <dc:creator>philboboADSK</dc:creator>
    <dc:date>2016-12-12T23:56:35Z</dc:date>
    <item>
      <title>How to create and join AVG paths in flexscript</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-create-and-join-avg-paths-in-flexscript/m-p/13556887#M60268</link>
      <description>&lt;P&gt;I know I can create paths by doing the following:&lt;/P&gt;&lt;PRE&gt;createinstance(node("/AGV/StraightPath",library()),model());&lt;/PRE&gt;&lt;P&gt;However, once created, sized, and positioned the paths are not connected. I tried to use the code from the join path edit mode, but was unable to reliably create good connection paths. Is there a good way to do this? The following is the code I am using to test the concept:&lt;/P&gt;&lt;PRE&gt;treenode path1 = createinstance(node("/AGV/StraightPath",library()),model());
treenode path2 = createinstance(node("/AGV/StraightPath",library()),model());
setsize(path1,3,1,1);
setsize(path2,8,1,1);
setloc(path1,1,0,0);
setloc(path2,5,1,0);
setrot(path2,0,0,90);
treenode from = path1;
treenode to = path2;
if (isclasstype(from, "AGV::Path") &amp;amp;&amp;amp; isclasstype(to, "AGV::Path")) {
    double distAlongFrom = 2.85;
    double distAlongTo = 0.16;
    treenode newPath = applicationcommand("Path_joinTo", from, to, distAlongFrom, distAlongTo);
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Dec 2016 19:16:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-create-and-join-avg-paths-in-flexscript/m-p/13556887#M60268</guid>
      <dc:creator>chris_smith7</dc:creator>
      <dc:date>2016-12-12T19:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and join AVG paths in flexscript</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-create-and-join-avg-paths-in-flexscript/m-p/13556888#M60269</link>
      <description>&lt;P&gt;It isn't the direct answer, but it should tell you the module functions are bit different than the 3D model command structure. Here is an example for another &lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/answers/29306/view.html" target="_blank"&gt;answer&lt;/A&gt; with the AGV module and script generated connections. &lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2016 22:41:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-create-and-join-avg-paths-in-flexscript/m-p/13556888#M60269</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2016-12-12T22:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and join AVG paths in flexscript</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-create-and-join-avg-paths-in-flexscript/m-p/13556889#M60270</link>
      <description>&lt;P&gt;You should call function_s(path, "finalizeSpatialChanges") after creating or moving an AGV path using code:&lt;/P&gt;&lt;PRE&gt;treenode path1 = createinstance(node("/AGV/StraightPath",library()),model());
treenode path2 = createinstance(node("/AGV/StraightPath",library()),model());
setsize(path1,3,1,1);
setsize(path2,8,1,1);
setloc(path1,1,0,0);
setloc(path2,5,1,0);
setrot(path2,0,0,90);
function_s(path1, "finalizeSpatialChanges");
function_s(path2, "finalizeSpatialChanges");
treenode from = path1;
treenode to = path2;
if (isclasstype(from, "AGV::Path") &amp;amp;&amp;amp; isclasstype(to, "AGV::Path")) {
    double distAlongFrom = 2.5;
    double distAlongTo = 0.16;
    treenode newPath = applicationcommand("Path_joinTo", from, to, distAlongFrom, distAlongTo);
}
&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Dec 2016 23:56:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-create-and-join-avg-paths-in-flexscript/m-p/13556889#M60270</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2016-12-12T23:56:35Z</dc:date>
    </item>
  </channel>
</rss>

