Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Value of a GLOB_MODPAR_NAME

Jochen Suehlo
Moderator
Is it possible to get the value of the GLOB_MODPAR_NAME, when you do not know its name in the script?
E.G.
IF GLOB_MODPAR_NAME <> "" THEN
name1 = GLOB_MODPAR_NAME : PARAMETERS name = name
value1 = ....
ENDIF
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
5 REPLIES 5
Anonymous
Not applicable
I don't see why not. GLOB_MODPAR_NAME just returns the string value of the last modified parameter.
Jochen Suehlo
Moderator
Matthew,
the string value of the last changed parameter, its name, is no problem.
But how do I get its value?
E.G. value_string = "A", but I want the numerical value of A.
So I would have to write value_value = value_string without quoation marks.
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
sinceV6
Advocate
Can't you use the parameter itself once you know which one is the last modified one?
Jochen Suehlo
Moderator
Can't you use the parameter itself once you know which one is the last modified one?
Yes, I could. But with 150 Parameters that would be a long script.
It would be easier with a loop, but there the script cannot use the GLOB_MODPAR_NAME itself, because that is the name of the parameter and not its value.
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
sinceV6
Advocate
I actually thought I spoke too soon, as I had to read again what you were originally asking. I did a few tests and tries, and I'm not really sure that what you are trying is possible. The gurus might know better.

In essence, it might sound like it is, but in practice, I really don't know. As I understand, you are trying to get sort of a dynamic GLOB_MODPAR_NAME stored somewhere (either a parameter or variable) and use that to search your parameters and get the value, but that would mean that GDL or the global variable would be open and smart enough to know what kind of value that is (it could be a string, a real value, an angle, a boolean, etc) and that you are using the script to scan your parameters to find a match, and I don't know if that is possible.

Also, like said, the returned value is a string, and AFAIK you can only compare it to other strings that either you specify or know in advance (like your parameters' names). It should be simple with a loop, but just don't know if it can work that way.

Either way, my broad guess is that if you are trying to know what was the last modified parameter, it is because you need to take action according to that last parameter, and you would need some kind of comparison to do it. (IF the_last_parameter_was_this THEN take_this_action)

In my 15min tries couldn't see the light.