<?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: Identify AGV path in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/identify-agv-path/m-p/13535022#M43033</link>
    <description>&lt;P&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/3229/julio.r.html" nodeid="3229"&gt;@Julio R&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Could you attach your model? That would help us understand your problem better.&lt;/P&gt;</description>
    <pubDate>Fri, 31 May 2019 15:13:15 GMT</pubDate>
    <dc:creator>joseph_g3</dc:creator>
    <dc:date>2019-05-31T15:13:15Z</dc:date>
    <item>
      <title>Identify AGV path</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/identify-agv-path/m-p/13535021#M43032</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 19.1.0 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I´ve been working on a model where the direction of an AGV doesn´t change. While I´ve find a solution through code on a pre Draw trigger, now I need to only apply that logic on certain paths.&lt;/P&gt;&lt;P&gt;Is there an easy reference to a node that indicates the path the AGV is traveling without using external events like control points?&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 15:05:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/identify-agv-path/m-p/13535021#M43032</guid>
      <dc:creator>julio_r</dc:creator>
      <dc:date>2019-05-14T15:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Identify AGV path</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/identify-agv-path/m-p/13535022#M43033</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/3229/julio.r.html" nodeid="3229"&gt;@Julio R&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Could you attach your model? That would help us understand your problem better.&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 15:13:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/identify-agv-path/m-p/13535022#M43033</guid>
      <dc:creator>joseph_g3</dc:creator>
      <dc:date>2019-05-31T15:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Identify AGV path</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/identify-agv-path/m-p/13535023#M43034</link>
      <description>&lt;P&gt;Hello &lt;A rel="user" href="https://answers.flexsim.com/users/14704/josephg3.html" nodeid="14704"&gt;@Joseph Gillespie&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is a simple example, there is a on predraw trigger on the AGV (yellow one) but I want to execute it only in a few paths, I've used control points to change a label but is difficult to get it to look right on sharp corners so I want to put an identifier on the path so the AGV can decide to execute the code or not according to the path that is on.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;A id="19587" href="https://answers.flexsim.com/storage/temp/19587-rotacion-del-agv.fsm"&gt;rotacion-del-agv.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 15:32:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/identify-agv-path/m-p/13535023#M43034</guid>
      <dc:creator>julio_r</dc:creator>
      <dc:date>2019-05-31T15:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Identify AGV path</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/identify-agv-path/m-p/13535024#M43035</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/3229/julio.r.html" nodeid="3229"&gt;@Julio R&lt;/A&gt;&lt;/P&gt;&lt;P&gt;What you are looking for is difficult to do since AGVs are built
around using control points.  One idea that may be helpful to you would be
to create a new path class under AGVNetwork Properties.  In the example I attached, I called this path class "NoRotation". &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="19589-capture1.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1499161i1E9D5DAEF8BA41C1/image-size/large?v=v2&amp;amp;px=999" role="button" title="19589-capture1.png" alt="19589-capture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;By
modifying your code to look like this, you can cause the code to only be implemented on paths that are labeled as that path class:&lt;/P&gt;&lt;PRE&gt;AGV thisAGV = AGV(current);
if(objectexists(item) &amp;amp;&amp;amp; (getvarnum(ownerobject(getvarnode(thisAGV.currentCP, "path").subnodes[1].value),"pathType")) == 4)
{
	item.rotation.z = -current.rotation.z;
}
&lt;/PRE&gt;&lt;P&gt;This code works by finding the class of the path under the control point that was last visited.  If the path is of the new path class (in my example it has a varnum value of 4, being the 4th path class), then the custom code will be executed.  For this to work it is also important to have the AGV travel to a control point at the start of each path where it can check what the current path class is.&lt;/P&gt;&lt;P&gt;Here is your model with this solution: &lt;A id="19590" href="https://answers.flexsim.com/storage/attachments/19590-rotacionanswer1.fsm"&gt;rotacionanswer1.fsm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Another solution that may be simpler would be to use process flow to make the AGV travel to a control point at the start of each path and then use a "Change Visual" activity on the edges where you don't want the orientation of the AGV to change.&lt;/P&gt;&lt;P&gt;This was a long explanation, so let me know if you have any questions.&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 21:21:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/identify-agv-path/m-p/13535024#M43035</guid>
      <dc:creator>joseph_g3</dc:creator>
      <dc:date>2019-05-31T21:21:42Z</dc:date>
    </item>
  </channel>
</rss>

