<?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: Getting the Story Index Number in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Getting-the-Story-Index-Number/m-p/73199#M40548</link>
    <description>Tom,&lt;BR /&gt;
&lt;BR /&gt;
For some reason you always have to set a variable equal to the Request function, i.e.:&lt;BR /&gt;

&lt;PRE&gt;story_ID_OK = REQUEST&amp;nbsp; ("Story", "", story_index, story_name)&lt;/PRE&gt;

Otherwise you get the error message. It actually does not interfere with the function of the part. The error only shows up when you check scripts.&lt;BR /&gt;
&lt;BR /&gt;
Generally I think the return value is 1, 0, or -1 depending on the Request function. I have rarely (if ever) used this value so I generally just put a dummy variable in to make the error go away.&lt;BR /&gt;
&lt;BR /&gt;
The variable &lt;B&gt;story_index&lt;/B&gt; will contain the number of the story but this may not match the story structure of your building. You may need an adjustment parameter for those cases.</description>
    <pubDate>Mon, 21 Jun 2004 14:12:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2004-06-21T14:12:30Z</dc:date>
    <item>
      <title>Getting the Story Index Number</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Getting-the-Story-Index-Number/m-p/73197#M40546</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I am trying to make Zones that are sensitve the the story they are placed on (for use in modules placed on multiple floors), and I am having trouble figuring out how to get the Index Number of the story.&lt;BR /&gt;
&lt;BR /&gt;
I found the reference for &lt;PRE&gt;REQUEST  ("Story", "", index, story_name)&lt;/PRE&gt; in the GDL reference manual, but I'm not really sure what to do with it from there.&lt;BR /&gt;
&lt;BR /&gt;
I tried using the index in the context of &lt;PRE&gt;Zname = index + Zname &lt;/PRE&gt;, but Archicad gives me an error "Unused function return value."&lt;BR /&gt;
&lt;BR /&gt;
Can anyone shed some light on this for me?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 21 Jun 2004 12:56:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Getting-the-Story-Index-Number/m-p/73197#M40546</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2004-06-21T12:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the Story Index Number</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Getting-the-Story-Index-Number/m-p/73198#M40547</link>
      <description>sorry, that should have been&lt;PRE&gt;ROOM_NUMBER = sindex + ROOM_NUMBER
&lt;/PRE&gt; not zname.</description>
      <pubDate>Mon, 21 Jun 2004 13:08:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Getting-the-Story-Index-Number/m-p/73198#M40547</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2004-06-21T13:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the Story Index Number</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Getting-the-Story-Index-Number/m-p/73199#M40548</link>
      <description>Tom,&lt;BR /&gt;
&lt;BR /&gt;
For some reason you always have to set a variable equal to the Request function, i.e.:&lt;BR /&gt;

&lt;PRE&gt;story_ID_OK = REQUEST&amp;nbsp; ("Story", "", story_index, story_name)&lt;/PRE&gt;

Otherwise you get the error message. It actually does not interfere with the function of the part. The error only shows up when you check scripts.&lt;BR /&gt;
&lt;BR /&gt;
Generally I think the return value is 1, 0, or -1 depending on the Request function. I have rarely (if ever) used this value so I generally just put a dummy variable in to make the error go away.&lt;BR /&gt;
&lt;BR /&gt;
The variable &lt;B&gt;story_index&lt;/B&gt; will contain the number of the story but this may not match the story structure of your building. You may need an adjustment parameter for those cases.</description>
      <pubDate>Mon, 21 Jun 2004 14:12:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Getting-the-Story-Index-Number/m-p/73199#M40548</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-06-21T14:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the Story Index Number</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Getting-the-Story-Index-Number/m-p/73200#M40549</link>
      <description>That was it.&lt;BR /&gt;
&lt;BR /&gt;
Here is how it ended up:&lt;PRE&gt;story_ID_OK = REQUEST  ("Story", "", story_index, story_name)
! adjust +1 for Euro-style flr numbers
IF story_index &amp;lt; 0 THEN
	Fix_Val = 0
ELSE
	Fix_Val = 1
ENDIF 
ROOM_NUMBER = STR (story_index+Fix_Val,1,0) + ROOM_NUMBER
&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Jun 2004 18:26:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Getting-the-Story-Index-Number/m-p/73200#M40549</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2004-06-21T18:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the Story Index Number</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Getting-the-Story-Index-Number/m-p/73201#M40550</link>
      <description>I think the reason you have to assign the return value of a REQUEST function to a variable is so that you are able to evaluate whether the REQUEST function was successful or not. If there was some error, the REQUEST function will return the value -1. Otherwise it will return the number of values filled into the variables named in the REQUEST function (this number can be different with each different REQUEST function).&lt;BR /&gt;
This way of operation may be useful for debugging your GDL code.&lt;BR /&gt;
Laszlo</description>
      <pubDate>Tue, 22 Jun 2004 09:00:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Getting-the-Story-Index-Number/m-p/73201#M40550</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2004-06-22T09:00:10Z</dc:date>
    </item>
  </channel>
</rss>

