<?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: for i = 1 HELP in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298938#M5226</link>
    <description>J&lt;BR /&gt;
&lt;BR /&gt;
I use this quite a bit, the only thing I can think of is&lt;BR /&gt;
"num_bays" has to be declared before the script is&lt;BR /&gt;
run  ie it needs f to be a parameter or defined in the &lt;BR /&gt;
master script&lt;BR /&gt;
&lt;BR /&gt;
ds</description>
    <pubDate>Fri, 04 Aug 2017 14:17:07 GMT</pubDate>
    <dc:creator>Dave Seabury</dc:creator>
    <dc:date>2017-08-04T14:17:07Z</dc:date>
    <item>
      <title>for i = 1 HELP</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298935#M5223</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Is there a way to use this statement but modify it to use 1 less than "num_bays"???&lt;BR /&gt;

&lt;PRE&gt;		for i = 1 to num_bays
			if strstr(bay_type, 'Car') then gosub "Draw Bay"
			if strstr(bay_type, 'PTW') then gosub "Draw Bay"
			if strstr(bay_type, 'Cycle') then gosub "Draw Cycle"
			
			add A,0, 0	! Move to next space&lt;/PRE&gt; &lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Aug 2017 15:27:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298935#M5223</guid>
      <dc:creator>JGoode</dc:creator>
      <dc:date>2017-08-02T15:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: for i = 1 HELP</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298936#M5224</link>
      <description>FOR I = 1 TO num_bays - 1&lt;BR /&gt;
&lt;BR /&gt;
David</description>
      <pubDate>Wed, 02 Aug 2017 17:32:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298936#M5224</guid>
      <dc:creator>Dave Seabury</dc:creator>
      <dc:date>2017-08-02T17:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: for i = 1 HELP</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298937#M5225</link>
      <description>&lt;BLOCKQUOTE&gt;Dave wrote:&lt;BR /&gt;FOR I = 1 TO num_bays - 1&lt;BR /&gt;
&lt;BR /&gt;
David&lt;/BLOCKQUOTE&gt; I tried this but no luck. I just made a num_bays_2 parameter and made it equal num_bays - 1 and it worked correctly.</description>
      <pubDate>Thu, 03 Aug 2017 12:46:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298937#M5225</guid>
      <dc:creator>JGoode</dc:creator>
      <dc:date>2017-08-03T12:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: for i = 1 HELP</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298938#M5226</link>
      <description>J&lt;BR /&gt;
&lt;BR /&gt;
I use this quite a bit, the only thing I can think of is&lt;BR /&gt;
"num_bays" has to be declared before the script is&lt;BR /&gt;
run  ie it needs f to be a parameter or defined in the &lt;BR /&gt;
master script&lt;BR /&gt;
&lt;BR /&gt;
ds</description>
      <pubDate>Fri, 04 Aug 2017 14:17:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298938#M5226</guid>
      <dc:creator>Dave Seabury</dc:creator>
      <dc:date>2017-08-04T14:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: for i = 1 HELP</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298939#M5227</link>
      <description>JGoode:&lt;BR /&gt;
&lt;BR /&gt;
Another option is to start at 2:&lt;BR /&gt;

&lt;PRE&gt;for i = 2 to num_bays&lt;/PRE&gt;

You should add a Signature to your Profile (click the Profile button near the top of this page) with your ArchiCAD version and operating system (see mine for an example) for more accurate help in this forum.&lt;BR /&gt;
&lt;BR /&gt;
David</description>
      <pubDate>Sat, 05 Aug 2017 12:54:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298939#M5227</guid>
      <dc:creator>David Maudlin</dc:creator>
      <dc:date>2017-08-05T12:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: for i = 1 HELP</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298940#M5228</link>
      <description>Not sure if this is relevant to your exact problem, but there doesn't seem to be any function for switching your "bay_type" from one "i" value to the next. If they are all supposed to be the same bay type then it might be better to do your string check outside the loop so it only needs to be calculated once.&lt;BR /&gt;
&lt;BR /&gt;
Also the strstr() function returns the integer position of the string within the string, so it might be advantageous to add "&amp;gt;0" to your "if strstr() then" statement, ie. "if strstr(bay_type, "Cars") &amp;gt; 0 then" just to avoid any funny business...&lt;BR /&gt;
&lt;BR /&gt;
Sorry, just procrastinating my own coding issues atm.&lt;BR /&gt;
&lt;BR /&gt;
As for the problem, I've never had any issue with the "num_bays - 1" approach, not sure what could be at issue there.</description>
      <pubDate>Mon, 07 Aug 2017 07:49:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/for-i-1-HELP/m-p/298940#M5228</guid>
      <dc:creator>JaseBee</dc:creator>
      <dc:date>2017-08-07T07:49:21Z</dc:date>
    </item>
  </channel>
</rss>

