2005-12-06 02:01 AM
2006-06-01 11:47 AM
Matthew wrote:I must be doing something wrong but I can't see what, or maybe it is a bug with V8.1
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.
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.
2006-06-01 04:09 PM
2006-06-02 05:39 AM
Matthew wrote:Ah, the old "Z direction problem".
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.
2006-06-02 08:44 AM
! 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
2006-06-02 10:37 AM
F. wrote:Thankyou so very much.
A new window with this text worked fine for me in 8.1:
! 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
2006-06-02 12:12 PM
2006-06-07 12:06 PM
F. wrote:
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.
2006-06-07 01:18 PM
Am I trying to do something that is impossible?A kind of.
2006-06-08 04:38 AM
F. wrote:Thanks for clarifying Frank.Am I trying to do something that is impossible?A kind of.😉 You haven't understood the problem.
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. BUT: 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.
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.
HTH, Frank
BTW: It's allowed to use:
TEXT2 0,0,"Hello Barry"
TEXT2 0,1,15*2
Not STR needed.
2006-06-08 08:26 AM
TEXT2 0,2, name1 !!will print text on plan PRINT name1 !!will do nothingin 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.