Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Zone Relations in Master Script

TomWaltz
Participant
Can anyone tell me if they see a reason this code snippet would do nothing in the Master Script:
	zn = REQUEST("Zone_relations", "", cat_name, cat_code, room_name, room_number)
	PARAMETERS  cat_name = cat_name
	PARAMETERS  cat_code = cat_code
It does not generate an error, but it also does not pass the values to the parameter list.
Tom Waltz
7 REPLIES 7
Frank Beister
Moderator
Where does it not work? Plan? Edit mode?

Maybe this can not work, because the Zone relations are not requestable, if you are in settings dialog.

Maybe this REQUEST does not work in running the MASTER/PARAMETER-Script, but only e.g. 2D?

Maybe your object is not placed in the area of a zone stamp?

Just some guessing.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
TomWaltz
Participant
F. wrote:
Where does it not work? Plan? Edit mode?
The parameters do not show up in the Edit Settings dialog, nor does their value make it into the object in Plan.
Maybe this can not work, because the Zone relations are not requestable, if you are in settings dialog.
The REQUEST I have in the 2D script works fine. It's only the one in the Master script that does not work.
Maybe this REQUEST does not work in running the MASTER/PARAMETER-Script, but only e.g. 2D?
That's what I'm afraid of.
Maybe your object is not placed in the area of a zone stamp?
I checked that one. I'm not THAT oblivious 🙂
Tom Waltz
Frank Beister
Moderator
I'm not THAT oblivious.
Just an idea. Sometimes its that easy to help.
The REQUEST I have in the 2D script works fine. It's only the one in the Master script that does not work.
Is that a REQUEST("Zone_relations", too?

You are using two things: REQUEST and PARAMETERS. Last one does not work each running of the script. Maybe REQUEST gives a result, but in this running-environment of the script the PARAMETERS does not work and other way round. Try it without using PARAMETERS. Try it with another statement, which shows, if theres a result. Something like LINE2 0,0,cat_code,cat_code or PRINT cat_code.
Have you tried to activate the "Eigenschaften"-Script (sorry have ony the german name by hand), by putting some statements for it inside. Maybe both statements work in this context and the script will be run through after changig some parameters in the settings dialog.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
TomWaltz
Participant
F. wrote:
The REQUEST I have in the 2D script works fine. It's only the one in the Master script that does not work.
Is that a REQUEST("Zone_relations", too?
It's the exact same REQUEST statement. I tried placing it in the Master script to get the values to show up in the parameter list (so I can access them from an add-on).
Have you tried to activate the "Eigenschaften"-Script (sorry have ony the german name by hand), by putting some statements for it inside. Maybe both statements work in this context and the script will be run through after changig some parameters in the settings dialog.
I'm not familiar with that. What does it do? A quick Google-translate tells me the word means "Characteristics".... maybe the "Properties" script?

I have not worked with that before... maybe it's time to start?
Tom Waltz
Frank Beister
Moderator
Yes property script. Thanks. I think this REQUEST is quiet interesting to feed the listings. So I thought it will work in the time this script is running. Maybe the PARAMETERS statement works in this case too.

It's years ago I programmed the property script for a zone stamp. I used an existing script for learning and as base for new code. Just copy some of this statements (like COMPONENTS) inside the script to make the gdl-parser work in this context. Elsewhere it will not even run.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Ben Cohen
Advocate
Hi Tom

Try changing something in the part and see if the parameter updates. I have had issues when passing values to parameters where they will only pass once the object has been changed in someway.
eg I have passed the north direction of a window into a parameter but the parameter only updates when the window is modified.
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
Frank Beister
Moderator
@Ben
PARAMETERS does only work, if you are in settings dialog of the object or in the gdl editor. It does not work if you make changes in the floor plan or in 3D. Not even if you change parameters by moveable hotspots.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm