The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Topics specific to the scripting and development of Library Parts and Libraries using Param-O or the Geometric Description Language – GDL. (Example: How do you use “REQUEST” GDL commands?)

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, Gordana Radonic, nbalogh, mnguyen, gkmethy, rmasaki, Akos Somorjai, Csilla Mai, Peter Baksa

User avatar
By Narska
#324666
I have an object and I define a parameter TEST_PARAM and set a default value of 1.

In the master script, I define the value of TEST_PARAM = 2 and draw a text symbol in the 2D script with text2 0,0, TEST_PARAM and it shows 2.

I now create an interactive schedule and "add library part parameter" TEST_PARAM to the fields. The field in the schedule displays as 1 and the object on the floor plan display as 2.

What is going on here? How do I have the schedule show the true value as calculated in the master script?
#324670
If you overwrite the value of a parameter variable in the master script, this new value is valid in all scripts, but the parameter itself is not overwritten. In the interactive schedule, therefore, the set parameter value is always output, since the Schedule only reads out the parameter and not the script.
To overwrite the parameter itself, use the PARAMETERS command.
e.g.
TEST_PARAM = 2
PARAMETERS TEST_PARAM = TEST_PARAM
#324699
Thank you! this is very clear now.


Joachim Suehlo wrote: Wed Apr 14, 2021 10:56 pm If you overwrite the value of a parameter variable in the master script, this new value is valid in all scripts, but the parameter itself is not overwritten. In the interactive schedule, therefore, the set parameter value is always output, since the Schedule only reads out the parameter and not the script.
To overwrite the parameter itself, use the PARAMETERS command.
e.g.
TEST_PARAM = 2
PARAMETERS TEST_PARAM = TEST_PARAM