BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

request("homedb_info") in Master script causes error?

matjashka
Enthusiast
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?
Matt Krol [LinkedIn]
BHMS Architects and Planners, Chicago
AC 10 ... 26 USA
5 REPLIES 5
Tell us what You are going to achieve...maybe there are the other ways than in Master/Parameter script?

Piotr
matjashka
Enthusiast
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.
Matt Krol [LinkedIn]
BHMS Architects and Planners, Chicago
AC 10 ... 26 USA
You have to move it to 2d script unfortunately...

but regarding UI script - there are new commands since 20 that mimic the Values command used in parameters script while not there.

Best Regards,
Piotr
sinceV6
Advocate
Hi.

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.
matjashka
Enthusiast
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.
Matt Krol [LinkedIn]
BHMS Architects and Planners, Chicago
AC 10 ... 26 USA
Learn and get certified!