<?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: Can a object request information from placed zones? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92117#M35276</link>
    <description>I appreciate all the responses on this topic. This board really helps having great people willing to help each other out. &lt;BR /&gt;
&lt;BR /&gt;
Tom,&lt;BR /&gt;
Thanks for the insight&lt;BR /&gt;
I will do some more research. If I find something new I will post it.&lt;BR /&gt;
&lt;BR /&gt;
Any other suggestions are greatly appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again</description>
    <pubDate>Tue, 06 Dec 2005 17:02:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-12-06T17:02:16Z</dc:date>
    <item>
      <title>Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92113#M35272</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I have a title block object and would like it to request Square footage from placed zones to calculate square footage to reflect in my object:&lt;BR /&gt;
&lt;BR /&gt;
First Floor:      #####&lt;BR /&gt;
Second Floor: #####&lt;BR /&gt;
Total Living:   ##### &lt;BR /&gt;
ETC............ &lt;BR /&gt;
or am I just dreaming &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Dec 2005 01:01:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92113#M35272</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-06T01:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92114#M35273</link>
      <description>&lt;BLOCKQUOTE&gt;hhd801 wrote:&lt;BR /&gt;I have a title block object and would like it to request Square footage from placed zones to calculate square footage to reflect in my object:&lt;/BLOCKQUOTE&gt;
it's what zone stamps do isn't it? you could use an existing one or look at an existing stamp's GDL to see how it works . . .&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
~/archiben</description>
      <pubDate>Tue, 06 Dec 2005 03:41:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92114#M35273</guid>
      <dc:creator>__archiben</dc:creator>
      <dc:date>2005-12-06T03:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92115#M35274</link>
      <description>I have edited existing stamps. From what I can understand it appears that a request can only be made from a label in this situation and will only pull current selected data at the time of placement and/or selection before placement. If it could be done it seems to me it would be some sort of calculation script that would need to count and calculate all placed zones and from that I would need parameters to sort the collected data. The only question would be how would you regenerate the data if the zones change or other zones are added. &lt;BR /&gt;
&lt;BR /&gt;
Makes sense to me but I am probably out in left field.</description>
      <pubDate>Tue, 06 Dec 2005 16:02:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92115#M35274</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-06T16:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92116#M35275</link>
      <description>I think your question is whether non-Zone objects can report information about Zones.&lt;BR /&gt;
&lt;BR /&gt;
The answer is "kind of"&lt;BR /&gt;
&lt;BR /&gt;
You can use the REQUEST statement to get the Category, Name, and Room Number. I don't believe you can access areai, perimeter, or volume though.</description>
      <pubDate>Tue, 06 Dec 2005 16:26:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92116#M35275</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2005-12-06T16:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92117#M35276</link>
      <description>I appreciate all the responses on this topic. This board really helps having great people willing to help each other out. &lt;BR /&gt;
&lt;BR /&gt;
Tom,&lt;BR /&gt;
Thanks for the insight&lt;BR /&gt;
I will do some more research. If I find something new I will post it.&lt;BR /&gt;
&lt;BR /&gt;
Any other suggestions are greatly appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again</description>
      <pubDate>Tue, 06 Dec 2005 17:02:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92117#M35276</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-06T17:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92118#M35277</link>
      <description>&lt;BLOCKQUOTE&gt;hhd801 wrote:&lt;BR /&gt;I appreciate all the responses on this topic. This board really helps having great people willing to help each other out. &lt;BR /&gt;
&lt;BR /&gt;
Tom,&lt;BR /&gt;
Thanks for the insight&lt;BR /&gt;
I will do some more research. If I find something new I will post it.&lt;BR /&gt;
&lt;BR /&gt;
Any other suggestions are greatly appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again&lt;/BLOCKQUOTE&gt;

It's ugly, but the Zones could write to a text file that your object then reads...</description>
      <pubDate>Thu, 16 Mar 2006 21:32:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92118#M35277</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2006-03-16T21:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92119#M35278</link>
      <description>&lt;BLOCKQUOTE&gt;TomWaltz wrote:&lt;BR /&gt;I think your question is whether non-Zone objects can report information about Zones.&lt;BR /&gt;
&lt;BR /&gt;
The answer is "kind of"&lt;BR /&gt;
&lt;BR /&gt;
You can use the REQUEST statement to get the Category, Name, and Room Number. I don't believe you can access areai, perimeter, or volume though.&lt;/BLOCKQUOTE&gt;

I am just trying to do exactly this but with no luck so far.&lt;BR /&gt;
I actually want my window to report which room zone it belongs to.&lt;BR /&gt;
Couldn't get that to work so I just created a new object that just draws a circle in 2D and I place that object in a zone.&lt;BR /&gt;
In the script (tried both master and 2D scripts) I have added the requests....&lt;BR /&gt;
&lt;BR /&gt;
dummy=REQUEST("Zone_relations", "", cat_1, code_1, name_1, num_1, cat_2, code_2, name_2, num_2)&lt;BR /&gt;
&lt;BR /&gt;
and&lt;BR /&gt;
&lt;BR /&gt;
dummy_2=REQUEST("Zone_category", "", catname, catcode)&lt;BR /&gt;
&lt;BR /&gt;
In both cases I get nothing returned in the variables.&lt;BR /&gt;
&lt;BR /&gt;
However a zone stamp requesting exactly the same works fine for "zone category" but nothing for "zone relations".&lt;BR /&gt;
&lt;BR /&gt;
I assume "zone category" only works with zone stamps and "zone relations" is for objects, but it doesn't seem to work.&lt;BR /&gt;
&lt;BR /&gt;
Has anyone had any luck in this area or be able to shed some light on the subject please?&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 01 Jun 2006 06:41:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92119#M35278</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2006-06-01T06:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92120#M35279</link>
      <description>The request for ZONE_CATEGORY is fors zone stamp objects only.&lt;BR /&gt;
&lt;BR /&gt;
ZONE_RELATION I got working a while ago. No time to test, but some hints: The zones are manual or automatic ones? There are double layered zones in this area? Zones are visible?&lt;BR /&gt;
&lt;BR /&gt;
What is the return value of the command?</description>
      <pubDate>Thu, 01 Jun 2006 06:50:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92120#M35279</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-06-01T06:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92121#M35280</link>
      <description>&lt;BLOCKQUOTE&gt;F. wrote:&lt;BR /&gt;The request for ZONE_CATEGORY is fors zone stamp objects only.&lt;BR /&gt;
&lt;BR /&gt;
ZONE_RELATION I got working a while ago. No time to test, but some hints: The zones are manual or automatic ones? There are double layered zones in this area? Zones are visible?&lt;BR /&gt;
&lt;BR /&gt;
What is the return value of the command?&lt;/BLOCKQUOTE&gt;

Yep, zones are on and I have tried both manually placed and flood fill zones.&lt;BR /&gt;
There are no overlapping zones.&lt;BR /&gt;
&lt;BR /&gt;
I am simply getting "0" for the return of the REQUEST and for the variables.&lt;BR /&gt;
I am checking this with a simple "PRINT" command in the 2D script.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 01 Jun 2006 07:05:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92121#M35280</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2006-06-01T07:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92122#M35281</link>
      <description>&lt;BLOCKQUOTE&gt;Barry wrote:&lt;BR /&gt;I actually want my window to report which room zone it belongs to.&lt;BR /&gt;
Couldn't get that to work so I just created a new object that just draws a circle in 2D and I place that object in a zone.&lt;BR /&gt;
In the script (tried both master and 2D scripts) I have added the requests....&lt;BR /&gt;
&lt;BR /&gt;
dummy=REQUEST("Zone_relations", "", cat_1, code_1, name_1, num_1, cat_2, code_2, name_2, num_2)&lt;BR /&gt;
&lt;BR /&gt;
and&lt;BR /&gt;
&lt;BR /&gt;
dummy_2=REQUEST("Zone_category", "", catname, catcode)&lt;BR /&gt;
&lt;BR /&gt;
In both cases I get nothing returned in the variables.&lt;BR /&gt;
&lt;BR /&gt;
However a zone stamp requesting exactly the same works fine for "zone category" but nothing for "zone relations".&lt;BR /&gt;
&lt;BR /&gt;
I assume "zone category" only works with zone stamps and "zone relations" is for objects, but it doesn't seem to work.&lt;BR /&gt;
&lt;BR /&gt;
Has anyone had any luck in this area or be able to shed some light on the subject please?&lt;BR /&gt;
&lt;BR /&gt;
Barry.&lt;/BLOCKQUOTE&gt;

You are right that "Zone_category" applies only to zone stamps and "Zone _relations" is for library parts. I have been doing a good bit of work with the latter lately and they are working as well as they can (I do wish the library parts could get more out of the zone than just name, rank and serial number). You do need to make sure that the part is actually in the zone - this is not always as obvious as it might seem.&lt;BR /&gt;
&lt;BR /&gt;
Doors and windows can be a little tricky and as I recall the docs are misleading (if not actually wrong). The zone that the part is in is determined (as far as I can tell) only by its center of gravity (so to speak). That is to say what ever zone it is predominantly in. I have made a little dynamic hotspot to act as a switch for this purpose in door and window tags.</description>
      <pubDate>Thu, 01 Jun 2006 07:09:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92122#M35281</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-01T07:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92123#M35282</link>
      <description>&lt;BLOCKQUOTE&gt;Matthew wrote:&lt;BR /&gt;
You are right that "Zone_category" applies only to zone stamps and "Zone _relations" is for library parts. I have been doing a good bit of work with the latter lately and they are working as well as they can (I do wish the library parts could get more out of the zone than just name, rank and serial number). You do need to make sure that the part is actually in the zone - this is not always as obvious as it might seem.&lt;BR /&gt;
&lt;BR /&gt;
Doors and windows can be a little tricky and as I recall the docs are misleading (if not actually wrong). The zone that the part is in is determined (as far as I can tell) only by its center of gravity (so to speak). That is to say what ever zone it is predominantly in. I have made a little dynamic hotspot to act as a switch for this purpose in door and window tags.&lt;/BLOCKQUOTE&gt;

I must be doing something wrong but I can't see what, or maybe it is a bug with V8.1&lt;BR /&gt;
&lt;BR /&gt;
This is my 2D script for a circle that I place in the zone.&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#ff0000"&gt;circle2 0,0,0.2&lt;BR /&gt;
&lt;BR /&gt;
dummy=REQUEST("Zone_relations", "", cat_1, code_1, name_1, num_1, cat_2, code_2, name_2, num_2)&lt;BR /&gt;
&lt;BR /&gt;
print dummy&lt;BR /&gt;
&lt;BR /&gt;
print cat_1&lt;BR /&gt;
print code_1&lt;BR /&gt;
print name_1&lt;BR /&gt;
print num_1&lt;BR /&gt;
&lt;BR /&gt;
print "second variables"&lt;BR /&gt;
&lt;BR /&gt;
print cat_2&lt;BR /&gt;
print code_2&lt;BR /&gt;
print name_2&lt;BR /&gt;
print num_2&lt;/FONT&gt;&lt;BR /&gt;
Edit : these should have been for the second variable - not repeating the first.&lt;BR /&gt;
&lt;BR /&gt;
View the 2D preview and you should see the values of the variables are all "0".&lt;BR /&gt;
It doesn't seem to matter if I do the REQUEST in the 2D or master script.&lt;BR /&gt;
&lt;BR /&gt;
Here is a snapshot of my zone with the circle in it.&lt;BR /&gt;
The zone must be fine as the lable works.&lt;BR /&gt;
I don't know how I can get the circle object any more inside the zone than this.&lt;BR /&gt;
&lt;BR /&gt;
I can get the windows to list their zones with the interactive schedules so I am sure there is no problem with the zones or placement of windows.&lt;BR /&gt;
But I want to write out the zone info to a text file which is why I want the REQUEST to work.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 01 Jun 2006 09:47:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92123#M35282</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2006-06-01T09:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92124#M35283</link>
      <description>It the return value of the request function (dummy) is zero then the zone is not being detected. I don't know why this would be unless the part is outside the zone in the Z direction. I never used this function in 8.1 (only 9) so I don't know if that could be an issue.</description>
      <pubDate>Thu, 01 Jun 2006 14:09:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92124#M35283</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-01T14:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92125#M35284</link>
      <description>&lt;BLOCKQUOTE&gt;Matthew wrote:&lt;BR /&gt;It the return value of the request function (dummy) is zero then the zone is not being detected. I don't know why this would be unless the part is outside the zone in the Z direction. I never used this function in 8.1 (only 9) so I don't know if that could be an issue.&lt;/BLOCKQUOTE&gt;

Ah, the old "Z direction problem".&lt;BR /&gt;
&lt;BR /&gt;
Just checked and my zones where all zero height so I altered them and still no luck.&lt;BR /&gt;
I'll keep playing when I can and see what I can come up with.&lt;BR /&gt;
I'll give it a go in V9.0 which I just got the other day but haven't used as I'm waiting for V10 in a week or two.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help though Matthew and Frank.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Fri, 02 Jun 2006 03:39:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92125#M35284</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2006-06-02T03:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92126#M35285</link>
      <description>A new window with this text worked fine for me in 8.1:&lt;BR /&gt;

&lt;PRE&gt;! line spacing
s=1.5*0.5*GLOB_SCALE/100

! infos
n = REQUEST ("ZONE_RELATIONS", "", kategoriename1, code1, name1, nummer1 , kategoriename2, code2, name2, nummer2)

! orientation
m = REQUEST ("WINDOW_DOOR_ZONE_RELEV", "", richtung)

! no of rooms
raum=n/4

! orientation correction
IF richtung=1 THEN s=-s ELSE s=s

! room 1
IF n=4 or n=8 THEN
  TEXT2 0,1*s, "ROOM: 1/" + STR(raum,1,0)
  TEXT2 0,2*s, name1 + " " + nummer1
  TEXT2 0,3*s, "[" + code1 + "/" + kategoriename1 + "]"
  ENDIF

! room 2
s=-s
IF n=8 THEN
  TEXT2 0,1*s, "ROOM: 2/" + STR(raum,2,0)
  TEXT2 0,2*s, name2 + " " + nummer2
  TEXT2 0,3*s, "[" + code2 + "/" + kategoriename2 + "]"
  ENDIF&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Jun 2006 06:44:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92126#M35285</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-06-02T06:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92127#M35286</link>
      <description>&lt;BLOCKQUOTE&gt;F. wrote:&lt;BR /&gt;A new window with this text worked fine for me in 8.1:&lt;BR /&gt;

&lt;PRE&gt;! line spacing
s=1.5*0.5*GLOB_SCALE/100

! infos
n = REQUEST ("ZONE_RELATIONS", "", kategoriename1, code1, name1, nummer1 , kategoriename2, code2, name2, nummer2)

! orientation
m = REQUEST ("WINDOW_DOOR_ZONE_RELEV", "", richtung)

! no of rooms
raum=n/4

! orientation correction
IF richtung=1 THEN s=-s ELSE s=s

! room 1
IF n=4 or n=8 THEN
  TEXT2 0,1*s, "ROOM: 1/" + STR(raum,1,0)
  TEXT2 0,2*s, name1 + " " + nummer1
  TEXT2 0,3*s, "[" + code1 + "/" + kategoriename1 + "]"
  ENDIF

! room 2
s=-s
IF n=8 THEN
  TEXT2 0,1*s, "ROOM: 2/" + STR(raum,2,0)
  TEXT2 0,2*s, name2 + " " + nummer2
  TEXT2 0,3*s, "[" + code2 + "/" + kategoriename2 + "]"
  ENDIF&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;

Thankyou so very much.&lt;BR /&gt;
This works absolutely fine.&lt;BR /&gt;
&lt;BR /&gt;
Seems strange though that you can add TEXT2 to display the result on the plan but the PRINT command just gives a "0" result in the dialogue box.&lt;BR /&gt;
I use this quite often to get feedback while working on an object.&lt;BR /&gt;
I will obviously need to be very careful in future.&lt;BR /&gt;
&lt;BR /&gt;
I changed your variable names for mine and it was perfect.&lt;BR /&gt;
Even adding the TEXT2 command to my original works as you demonstrated.&lt;BR /&gt;
&lt;BR /&gt;
So the REQUEST was working, just not the PRINT command.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again,&lt;BR /&gt;
Barry.</description>
      <pubDate>Fri, 02 Jun 2006 08:37:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92127#M35286</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2006-06-02T08:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92128#M35287</link>
      <description>Most REQUESTs and GLOBALs, which refer to environment specific status of the object do not work in the dialogue box or the object editing window. That sometimes anoying, because a placed object or window does have this relations yet, but they are not available, when the script runs for the preview.&lt;BR /&gt;
&lt;BR /&gt;
We had this with ZONE_RELATIONS a few weeks ago in the german talk, where one wanted to take over the zone number into an object, which was placed on the zone area. We did not get it to work, because in case PARAMETERS work, the REQUEST returned a zero-result.&lt;BR /&gt;
&lt;BR /&gt;
I normally do not use PRINT, because its seldom executed in the moment, when I need the printed result.</description>
      <pubDate>Fri, 02 Jun 2006 10:12:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92128#M35287</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-06-02T10:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92129#M35288</link>
      <description>&lt;BLOCKQUOTE&gt;F. wrote:&lt;BR /&gt;
&lt;BR /&gt;
We had this with ZONE_RELATIONS a few weeks ago in the german talk, where one wanted to take over the zone number into an object, which was placed on the zone area. We did not get it to work, because in case PARAMETERS work, the REQUEST returned a zero-result.
&lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
One more question if I may, and I think it may be the same thing you are mentioning above.&lt;BR /&gt;
&lt;BR /&gt;
The REQUEST returns a value for "name1" and this value can be used in a TEXT2 comand to show this value as text on the plan.&lt;BR /&gt;
But it seems this value can not be used in any other way?&lt;BR /&gt;
&lt;BR /&gt;
I want to set a parameter to be equal to this "name1" value but I can't.&lt;BR /&gt;
It seems that although the value appears to be a text string (as it can be used with TEXT2 command without using STR() to convert it), if I check with VARTYPE I am told it is numerical.&lt;BR /&gt;
&lt;BR /&gt;
How can I convert this numerical value (that is really text) into a text string that I can use in a parameter.&lt;BR /&gt;
i.e. I would like to say "PARAMETERS room_name = name1" but I just get a "String type expression required" error message.&lt;BR /&gt;
&lt;BR /&gt;
Am I trying to do something that is impossible?&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Wed, 07 Jun 2006 10:06:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92129#M35288</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2006-06-07T10:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92130#M35289</link>
      <description>&lt;BLOCKQUOTE&gt;Am I trying to do something that is impossible?&lt;/BLOCKQUOTE&gt;

A kind of. &lt;E&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/E&gt; You haven't understood the problem.&lt;BR /&gt;
&lt;BR /&gt;
An object is a collection of scripts, that run in different context to keep proper return values for the environment, which starts them running. The number of executions are much more than you might think of. If you are in settings dialog. 1st the parameter script is executed, then maybe the interface script and finaly the 2D-script for the 2D-preview. The master script is a special script, which is executed every time before any script runs. &lt;B&gt;BUT&lt;/B&gt;: Many GDL-commands do work only in the context, they are for. Regardless if they are in their special script or in the master. A POLY2 in master script does not create a polyline, when running the 3D-script. When executing the 3D-script the interpreter just ignores the POLY2. And this happens with the ZONE-REQUEST and the PARAMETERS command too. If the 2D-script in floor plan is executed you get a proper result for the request, but the PARAMETERS does not work. If the parameterscript is executed the REQUEST does not work. Even if you are in floor plan and the parameter script is running, because you move a graphical hotspot. It just returns no result and the variable "name1" is undefined and is set per default as type numeric, value 0.&lt;BR /&gt;
IMHO there are a lot of situations GDL could execute some commands as in this case, but it does not "by design". I have reported a while ago list of it, but it's just one voice asking for it. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
HTH, Frank&lt;BR /&gt;
&lt;BR /&gt;
BTW: It's allowed to use:&lt;BR /&gt;
TEXT2 0,0,"Hello Barry"&lt;BR /&gt;
TEXT2 0,1,15*2&lt;BR /&gt;
&lt;BR /&gt;
Not STR needed.</description>
      <pubDate>Wed, 07 Jun 2006 11:18:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92130#M35289</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-06-07T11:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92131#M35290</link>
      <description>&lt;BLOCKQUOTE&gt;F. wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;Am I trying to do something that is impossible?&lt;/BLOCKQUOTE&gt;

A kind of. &lt;E&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/E&gt; You haven't understood the problem.&lt;BR /&gt;
&lt;BR /&gt;
An object is a collection of scripts, that run in different context to keep proper return values for the environment, which starts them running. The number of executions are much more than you might think of. If you are in settings dialog. 1st the parameter script is executed, then maybe the interface script and finaly the 2D-script for the 2D-preview. The master script is a special script, which is executed every time before any script runs. &lt;B&gt;BUT&lt;/B&gt;: Many GDL-commands do work only in the context, they are for. Regardless if they are in their special script or in the master. A POLY2 in master script does not create a polyline, when running the 3D-script. When executing the 3D-script the interpreter just ignores the POLY2. And this happens with the ZONE-REQUEST and the PARAMETERS command too. If the 2D-script in floor plan is executed you get a proper result for the request, but the PARAMETERS does not work. If the parameterscript is executed the REQUEST does not work. Even if you are in floor plan and the parameter script is running, because you move a graphical hotspot. It just returns no result and the variable "name1" is undefined and is set per default as type numeric, value 0.&lt;BR /&gt;
IMHO there are a lot of situations GDL could execute some commands as in this case, but it does not "by design". I have reported a while ago list of it, but it's just one voice asking for it. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
HTH, Frank&lt;BR /&gt;
&lt;BR /&gt;
BTW: It's allowed to use:&lt;BR /&gt;
TEXT2 0,0,"Hello Barry"&lt;BR /&gt;
TEXT2 0,1,15*2&lt;BR /&gt;
&lt;BR /&gt;
Not STR needed.&lt;/BLOCKQUOTE&gt;

Thanks for clarifying Frank.&lt;BR /&gt;
I know the master script is run before any other script.&lt;BR /&gt;
That's why it is a good idea to put common calculations in the master rather than repeat in the other scripts.&lt;BR /&gt;
&lt;BR /&gt;
But what is annoying is that the REQUEST command in the master script returns a value to the variables.&lt;BR /&gt;
These variables can be used in the TEXT2 command (also within the master script) and will place the appropriate text on the plan.&lt;BR /&gt;
So the variables obviously have a value.&lt;BR /&gt;
But you can't use this variable for any other use within the same master script.&lt;BR /&gt;
This I don't quite understand - does the variable have a value or not?&lt;BR /&gt;
Seems it does for one instance but not on the very next line of the same script.&lt;BR /&gt;
&lt;BR /&gt;
i.e.&lt;BR /&gt;
&lt;FONT color="#ff001b"&gt;n = REQUEST ("ZONE_RELATIONS", "", kategoriename1, code1, name1, nummer1 , kategoriename2, code2, name2, nummer2) &lt;BR /&gt;
&lt;BR /&gt;
TEXT2 0,2, name1&lt;/FONT&gt;    &lt;FONT color="#001bff"&gt;!!will print text on plan&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#ff001b"&gt;PRINT name1      &lt;/FONT&gt;&lt;FONT color="#0024ff"&gt;!!will do nothing&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#ff003f"&gt;PARAMETERS room_name = name1     &lt;/FONT&gt; &lt;FONT color="#0024ff"&gt;!!will give error stating string type expression required (room_name has been set as a text parameter)&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
I can get around the problem as I just won't be able to display the result as a locked paramater as I was hoping to do.&lt;BR /&gt;
Or maybe not as I want to use the zone name as part of the name of a window to be listed in an external text file.&lt;BR /&gt;
Anyway I will have a little more of an experiment.&lt;BR /&gt;
Worst comes to the worst the user can set a parameter in the window manually to choose the room (zone) name.&lt;BR /&gt;
Then I won't have to worry about zones at all - just thought this might be a nice way to automate everything.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again for your help Frank.&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 08 Jun 2006 02:38:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92131#M35290</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2006-06-08T02:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can a object request information from placed zones?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92132#M35291</link>
      <description>To put&lt;BR /&gt;

&lt;PRE&gt;TEXT2 0,2, name1 !!will print text on plan
PRINT name1 !!will do nothing
&lt;/PRE&gt;

in the master script shows the danger of misunderstandig of the master script . Only because it can contain commands of different context, they work not at the same time. See my last posting. It is nowhere documented in which context the GDL commands do work proper. Your "name1" does have a valid value running the 2D script, in which TEXT2 is executed too. As there is no result using PRINT shows, that PRINT is executed in another environment "name1" has no value assigned to. I guess PRINT works only in the parameter script. Would make sense.&lt;BR /&gt;
&lt;BR /&gt;
One thing in all scripts do work is OPEN, OUTPUT and CLOSE. Try it and write out in master-script GLOB_CONTEXT, "name1" and e.g. GLOB_SCRIPTTYPE into a text file. You will astonished how often the master is run through and which variables get the right value.&lt;BR /&gt;
But I wouldn't think of using a textfile to save the zone name. It would slow down your project significant and is a "bad" programming style.</description>
      <pubDate>Thu, 08 Jun 2006 06:26:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-object-request-information-from-placed-zones/m-p/92132#M35291</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-06-08T06:26:11Z</dc:date>
    </item>
  </channel>
</rss>

