<?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: network nodes connection by using global table in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/network-nodes-connection-by-using-global-table/m-p/13512152#M25006</link>
    <description>&lt;P&gt;Thank you &lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2019 08:07:44 GMT</pubDate>
    <dc:creator>jyothi_n</dc:creator>
    <dc:date>2019-03-08T08:07:44Z</dc:date>
    <item>
      <title>network nodes connection by using global table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/network-nodes-connection-by-using-global-table/m-p/13512150#M25004</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 18.2.3 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;A id="17757" href="https://answers.flexsim.com/storage/attachments/17757-network-nodes.fsm"&gt;network-nodes.fsm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;in my model i want to create network nodes by using coordinates and name taken from the global table and they have to be connected by using A type .i added some script in that model and i was unable to execute it.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 12:35:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/network-nodes-connection-by-using-global-table/m-p/13512150#M25004</guid>
      <dc:creator>jyothi_n</dc:creator>
      <dc:date>2019-03-07T12:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: network nodes connection by using global table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/network-nodes-connection-by-using-global-table/m-p/13512151#M25005</link>
      <description>&lt;P&gt;Here's your code that will work now&lt;/P&gt;
&lt;PRE&gt;int numRows = Table("GlobalTable1").numRows;
int x_Col = 2;
int y_Col = 3;
int z_Col = 4;
int Name_COL = 1;
treenode prevnode = NULL;
for (int i=1; i&amp;lt;=Table("GlobalTable1").numRows; i++) 
{
	
	int xLoc=Table("GlobalTable1").cell(i,x_Col).value;
	int yLoc=Table("GlobalTable1").cell(i,y_Col).value;
	int zLoc=Table("GlobalTable1").cell(i,z_Col).value;
	string newName = Table("GlobalTable1").cell(i,Name_COL).value;
	treenode nnode = createinstance(library.find("?NetworkNode"),model());
	 nnode.as(Object).location.x=xLoc;
     nnode.as(Object).location.y=yLoc;
     nnode.as(Object).location.z=zLoc;
    nnode.name=newName;
	if (objectexists(prevnode))
		contextdragconnection(prevnode, nnode, "A");
	prevnode = nnode;
}&lt;/PRE&gt;
&lt;P&gt;If you want to access functions or variable inherent to a specific class, you should use .as(Class), rather then put the class in front unless you are defining a new object. The code above also limits the iterations to the length of your rows in the global table now.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 21:48:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/network-nodes-connection-by-using-global-table/m-p/13512151#M25005</guid>
      <dc:creator>joshua_s</dc:creator>
      <dc:date>2019-03-07T21:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: network nodes connection by using global table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/network-nodes-connection-by-using-global-table/m-p/13512152#M25006</link>
      <description>&lt;P&gt;Thank you &lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 08:07:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/network-nodes-connection-by-using-global-table/m-p/13512152#M25006</guid>
      <dc:creator>jyothi_n</dc:creator>
      <dc:date>2019-03-08T08:07:44Z</dc:date>
    </item>
  </channel>
</rss>

