Search the Knowledge Base Report a bug
Post new topic   Reply to topic   printer-friendly view   .    ArchiCAD-Talk Forum Index >>> Libraries / Library Parts / GDL >>> request("homedb_info") in Master script causes error?
View previous topic :: View next topic
Author Message
matjashka
Junior member
Junior member

Joined: 28 Nov 2007
Posts: 115
Location: USA Midwest

PostPosted: Mon Jun 19, 2017 5:30 pm    Post subject: request("homedb_info") in Master script causes err Reply with quote

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

AC 10...16/20 USA
Back to top
View user's profile Send private message    
Piotr Dobrowolski
Veteran member
Veteran member

Joined: 29 Oct 2003
Posts: 509
Location: Krakow - Poland

PostPosted: Mon Jun 19, 2017 5:43 pm    Post subject: Re: request("homedb_info") in Master script causes Reply with quote

Tell us what You are going to achieve...maybe there are the other ways than in Master/Parameter script?

Piotr
Back to top
View user's profile Send private message Visit poster's website    
matjashka
Junior member
Junior member

Joined: 28 Nov 2007
Posts: 115
Location: USA Midwest

PostPosted: Mon Jun 19, 2017 6:10 pm    Post subject: Re: request("homedb_info") in Master script causes Reply with quote

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

AC 10...16/20 USA
Back to top
View user's profile Send private message    
Piotr Dobrowolski
Veteran member
Veteran member

Joined: 29 Oct 2003
Posts: 509
Location: Krakow - Poland

PostPosted: Tue Jun 20, 2017 10:25 am    Post subject: Re: request("homedb_info") in Master script causes Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website    
sinceV6
Active member
Active member

Joined: 14 May 2010
Posts: 405
Location: US

PostPosted: Tue Jun 20, 2017 7:40 pm    Post subject: Re: request("homedb_info") in Master script causes Reply with quote

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.
Back to top
View user's profile Send private message    
matjashka
Junior member
Junior member

Joined: 28 Nov 2007
Posts: 115
Location: USA Midwest

PostPosted: Wed Jun 21, 2017 3:57 pm    Post subject: Re: request("homedb_info") in Master script causes Reply with quote

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

AC 10...16/20 USA
Back to top
View user's profile Send private message    
Display posts from previous:   
View previous topic :: View next topic
Post new topic   Reply to topic   printer-friendly view       ArchiCAD-Talk Forum Index >>> Libraries / Library Parts / GDL >>> request("homedb_info") in Master script causes error? All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB 2001, 2005 phpBB Group
Copyright 2012 - Graphisoft SE. All rights reserved worldwide. Terms of Use | Privacy Policy