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

Extracting GDL calculated values

John Edmundson
Participant
I searched the forum to see if anyone had asked this question yet, but could not find anything. Is there a method for extracting a GDL internally calculated value and having it listed in a Schedule?

I am able to get the values that I am able to INPUT in the GDL object with no problem, but not the ones that the GDL code establishes for me.
4 REPLIES 4
Barry Kelly
Moderator
If I understand correctly then your GDL object needs to save the calculation as a Parameter in the parameter list of the object.
Then in your schedule you can list the "Additional Parameters".

You can lock them in the GDL object so the user can't modify them - not that they would modify as they should revert back to the calculated value if scripted properly.
Locking them just means users won't get frustrated when they can edit them but the values dont change.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
John Edmundson
Participant
Thank you for helping. I have tried creating a variable in the Parameter list and then assigning a value to it in the body of the 2D code, no luck that I can tell changing the value.

To be sure you understand an example of what I am trying to do. A GDL Object draws a box that is X grids wide and Y grids long. The grid sizes are assigned in the Parameters input setting along with the of the number of grids. I can calculate the area of the box by multiplying all the numbers together. I can assign that value to a variable in the GDL code. I can have that value written out on the Object with the TEXT2 command, but I can not find a way to access the value in a SCHEDULE. Additional Parameters only allows me to access those variables that are defined in the Parameters list.
Barry Kelly
Moderator
You can't modify parameter values in the parameter list from the 2D or 3D scripts.
Do the calculations for the area in the Master or Parameter script.
Then use "PARAMETERS area = area" to asign the calculated value to the area parameter in you parameter list (you will need to create the parameter in the list).
You can still use this parameter value in your TEXT2 command in the 2D script (no need to recalculate it there again).

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
John Edmundson
Participant
After a little translating your explanation for this Cow Boy Texan, I figured it out and it works great. Thanks for the help partner.