The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Everything about GDL - Doors/Windows/Objects/Stairs etc. (Example: I created an object that prints an error message in 3D all the time, please help!)

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, Gergely Feher

I'm working on a script where I wanted to request layout information all the way up in Master script.
My script fails at the Interface level, with an error that the homedb_info request is present in the Parameter script, which is not the case. What can I do about it?
Witaj, Piotr.

In my Master script, i'm opening a data source and then running a loop that builds some arrays based on that (I say arrays because they were intended to be a mix of string and numeric values based on single source).

Inside that loop there's a nested loop which attempts to find a match between the values found in the data source and the current layout info (request("homedb_info")).

The reason that the loop was placed in Master was that I was also referring to those array values in the Interface script.

For now, I'm moving it all to the 2D script and I will have to re-think the Interface script.

Graphisoft made a lot of changes in GDL just because of the parameter script. I'm sure they had their reasons, but it feels like they patched all around it instead of fixing the way the parameter script relates to the other scripts.

As for your problem, remember that the Master Script is executed before every other script. Better to think of its name as Header Script. This is why you get that error: it is also executed in the parameter script, even though you didn't write it there. You can bypass this error using the GLOB_SCRIPT_TYPE global variable, but you have to make sure those values are not needed in the parameter script, e.g. giving them back to parameters; which I'm afraid will be your case since you are using them in the interface script and you'll need to give them back eventually.

The weird thing is... HOMEBD_INFO is listed as compatible with the parameter script.

Best regards.
Thanks guys.

In the tech document I saw (and there are so many versions online) it said that HOMEBD_INFO will cause "warning messages" in Parameter script. I realize that any script first runs Master but I didn't know that it would freak out -- lesson learned.

Luckily I was able to rewrite the object so that it fully depends on the text database and auto-detection, so I was able to drop the Interface script completely.

O.T.: I'm surprised that an erroneous infinite loop can still hang up the entire ArchiCAD when you click Check Script button. At some point I was forced to take screenshots of the changes I made because I could not save anything or check for errors.