License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Trouble with GLOB_MODPAR_NAME

Frank Beister
Moderator
I don't know, if someone here has mentioned the following bug. I sent a worse working object to our support and GS returned me now the following statement:

After opening the settings dialog of an object in AC 8.x or AC9 the global parameter GLOB_MODPAR_NAME contains the name of the first parameter listed in the parameters list. Up to version 7.0 this was an empty string. The changed behaviour can cause worse working old objects. But there is a workaround: Just place a new, hidden parameter as first parameter in the list. Then you can check in Master-Skript, if the GLOB_MODPAR_NAME contains this name. If so, set the GLOB_MODPAR_NAME to "" and it should work OK.

GS will fix that in the next version, so don't use it as a new genius trick.

I have not tested, if that happens sometimes or every time. But it seems so and should be a hint for debugging. I fixed 2 objects yet, which behave now normal again!
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
7 REPLIES 7
Anonymous
Not applicable
I didn't understand this explanation - would you be so kind as to explain this - it may be important to me!!
Rob
Graphisoft
Graphisoft
After opening the settings dialog of an object in AC 8.x or AC9 the global parameter GLOB_MODPAR_NAME contains the name of the first parameter listed in the parameters list.
everything seems to be ok with 8.1AUS R2 (2284) - the GLOB_MODPAR_NAME variable is empty
::rk
Frank Beister
Moderator
@Rob
Would be nice, that it's no problem in the AUS localized version, but I don't think so.

How have you checked it? With print or text2?

So this will not bring up the bug, because the master script ist often run through, because before every parameter script running and user interface running and 2D-script-running etc. the master is interpreted. And not every time the print or text2 command will be executed. So maybe the GLOB_MODPAR_NAME isn't empty, but GDL can't tell it to you.

I have searched for it too, but haven't found it. Knows the hell, how GS has found it. Debugger will not work either.

@MikeS
What do you not understand?
If you open the settings dialog of on object. Some scripts are executed. Parameters, user etc. All before the master. Normally you haven't changed a parameter straight after opening the dialog. So you camn use this circumstance to check it by if GLOB_MODPAR_NAME="" and make some decisions (as resetting or recalculating some parameters, which might have changed by usage of moveable hotspots. The Bug in AC 8.x/9 is, that it will not be empty, but will have the name of the first parameter in your list. So put there a dummy and check for this:
if GLOB_MODPAR_NAME="" or GLOB_MODPAR_NAME="dummy"
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
Rob
Graphisoft
Graphisoft
wait, wait, I am not really sure what you are trying to say. So you're saying that when you go to 'custom settings' tab of a lib. part (which is coded by the interface script) the GLOB_MODPAR_NAME it's not empty and has a value of the very first parameter from the parameters list. is that right?
could you post an example how you have found that?
::rk
Frank Beister
Moderator
Right.

But ... 'which is coded by the interface script' ist not all: If you you go to 'custom settings' tab of a lib. part the parameters script (master before) is executed too. And every time a value of a parameter has changed, as the interface script too, of course. And as the 2D-script too, if you have choosen ground floor preview or 3d-script (master before!) if you have choosen perspective preview. You see. The master is executed very often in settings dialog. In which one the GLOB_MODPAR_NAME is not empty as it sould, I don't know.

And I haven't found it. I had a worse working object and didn't found out whats going wrong. And I was nearly shure, that its not my fault. In earlier times I made in this cases a plan-dump, but this feature does not exist any more. I guessed the error anywhere else and was abit surprised, that this is the bug. Least: No, I have no really example to show it.
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
Anonymous
Not applicable
Here is a long-standing workaround for this phenomenon. Include the statement: VALUES "var" GLOB_MODPAR_NAME
Include a text parameter called var in your parameter list.

You can check for the value of var in ANY script.

Graphisoft specifically state that GLOB_MODPAR_NAME is valid only in the PARAMETERS script, but sometimes it works in the Master Script - but not necessarily in every case.

The workaround definitely works in every script that I have tried, and can help to eliminate much fruitless effort to make GLOB_MODPAR_NAME work!!
Hoa Tu
Newcomer
Thanks Mike,

Your workaround has saved me from a lot of trouble.

Cheers,
Hoa