<?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: Problem with forobjecttreeunder and destroyobject in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/problem-with-forobjecttreeunder-and-destroyobject/m-p/13490811#M8349</link>
    <description>&lt;P&gt;Because while it is searching into the tree you destroy an object and it doesn't work anymore. So, using it, you destroy only the first network node found.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2016 08:59:38 GMT</pubDate>
    <dc:creator>marco_baccalaro</dc:creator>
    <dc:date>2016-06-14T08:59:38Z</dc:date>
    <item>
      <title>Problem with forobjecttreeunder and destroyobject</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/problem-with-forobjecttreeunder-and-destroyobject/m-p/13490808#M8346</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 16.0.1 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt; I want to delete networknodes ,but the following code does't work.&lt;/P&gt;
&lt;PRE&gt;forobjecttreeunder(model())
{
	if (comparetext(getnodename(node("&amp;gt;classes/1", a)),"NetworkNode")) 	
	destroyobject(a);
}

&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Jun 2016 07:55:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/problem-with-forobjecttreeunder-and-destroyobject/m-p/13490808#M8346</guid>
      <dc:creator>li_ze1</dc:creator>
      <dc:date>2016-06-14T07:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with forobjecttreeunder and destroyobject</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/problem-with-forobjecttreeunder-and-destroyobject/m-p/13490809#M8347</link>
      <description>&lt;P&gt;Use this code:&lt;/P&gt;&lt;PRE&gt;for (int i = content(model); i &amp;gt; 1; i--)
{
	if (isclasstype(rank(model,i),CLASSTYPE_NETWORKNODE))
		destroyobject(rank(model,i));
}
&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Jun 2016 08:02:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/problem-with-forobjecttreeunder-and-destroyobject/m-p/13490809#M8347</guid>
      <dc:creator>marco_baccalaro</dc:creator>
      <dc:date>2016-06-14T08:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with forobjecttreeunder and destroyobject</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/problem-with-forobjecttreeunder-and-destroyobject/m-p/13490810#M8348</link>
      <description>&lt;P&gt;That's right and I got a new command "isclasstype", Thank you very much.&lt;/P&gt;
&lt;P&gt;But I want to know why it does't work with "forobjecttreeunder"?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 08:39:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/problem-with-forobjecttreeunder-and-destroyobject/m-p/13490810#M8348</guid>
      <dc:creator>li_ze1</dc:creator>
      <dc:date>2016-06-14T08:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with forobjecttreeunder and destroyobject</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/problem-with-forobjecttreeunder-and-destroyobject/m-p/13490811#M8349</link>
      <description>&lt;P&gt;Because while it is searching into the tree you destroy an object and it doesn't work anymore. So, using it, you destroy only the first network node found.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 08:59:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/problem-with-forobjecttreeunder-and-destroyobject/m-p/13490811#M8349</guid>
      <dc:creator>marco_baccalaro</dc:creator>
      <dc:date>2016-06-14T08:59:38Z</dc:date>
    </item>
  </channel>
</rss>

