We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2019-03-04 03:42 AM
Solved! Go to Solution.
2019-03-07 12:56 PM
Barry wrote:It's certainly a thorny problem, but I understand GS not wanting to introduce more global variables – they are seen in a similar light to 'goto' in programming circles (some use may be justified, but tread carefully), e.g.: Globals are Evil.
Ralph wrote:But I am currently creating a Bushfire Attack Level note and lables.
The GDL Reference Manual also states:View or project dependent global variables should not be used in parameter scripts (or master scripts run as parameter script)MVO values are view-dependent, so it makes no sense to capture them in stored parameters. Use the current value for rendering only and discard.
The BAL rating is set in the MVO and I use the library globals in the master script of the object and labels to find the BAL rating and set the parameter in the object.
Then based on that parameter the note or label will change accordingly.
Seems to be working fine for me and as soon as I change the MVO setting, all notes and labels update.
[...]
That is why we actually need a true UNIVERSAL GLOBAL variable that is project based and not model view based.
2019-03-04 12:46 PM
2019-03-04 04:50 PM
2019-03-04 05:33 PM
2019-03-04 05:38 PM
success = LIBRARYGLOBAL ("library_globals", "library_globals_0011", _param_global_0011) if success > 0 then parameters parama_0011 = _param_global_0011
2019-03-04 06:20 PM
Moonlight wrote:It doesn't work the way you expect because you shouldn't be doing it – refer to my note above. The GDL Reference Manual also states:
OK, I'm creating an object that must respond to a library global parameter value, apparently I have done it right, but I don't see the result of changing this parameter value in my screen ... funny enough, I have linked that parameter to the object GUI and it works just fine, but then I find out that for that the global parameter to take effect I must first open the object tool tab ... as if it will not refresh the parameter's value unless I open the object GUI.
DR;TL Global Parameter value doesn't refresh until I open the object's tool tab
View or project dependent global variables should not be used in parameter scripts (or master scripts run as parameter script)MVO values are view-dependent, so it makes no sense to capture them in stored parameters. Use the current value for rendering only and discard.
2019-03-06 05:53 PM
2019-03-07 02:31 AM
Ralph wrote:It all depends on what you are using the value for.
The GDL Reference Manual also states:View or project dependent global variables should not be used in parameter scripts (or master scripts run as parameter script)MVO values are view-dependent, so it makes no sense to capture them in stored parameters. Use the current value for rendering only and discard.
2019-03-07 12:56 PM
Barry wrote:It's certainly a thorny problem, but I understand GS not wanting to introduce more global variables – they are seen in a similar light to 'goto' in programming circles (some use may be justified, but tread carefully), e.g.: Globals are Evil.
Ralph wrote:But I am currently creating a Bushfire Attack Level note and lables.
The GDL Reference Manual also states:View or project dependent global variables should not be used in parameter scripts (or master scripts run as parameter script)MVO values are view-dependent, so it makes no sense to capture them in stored parameters. Use the current value for rendering only and discard.
The BAL rating is set in the MVO and I use the library globals in the master script of the object and labels to find the BAL rating and set the parameter in the object.
Then based on that parameter the note or label will change accordingly.
Seems to be working fine for me and as soon as I change the MVO setting, all notes and labels update.
[...]
That is why we actually need a true UNIVERSAL GLOBAL variable that is project based and not model view based.
2019-03-07 03:21 PM