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

Parameters in Lists

rav668
Participant
Hello!
I have a problem with parameter that I need in Lists. I am trying to receive light width in window. I thought I may use 2d script and do some math in it: ac_wallhole_width - gs_frame_width - gs_frame_width_left = light_width. However this light_width-parameter does not update in parameter list (is 0.00), so it is useless for me. Is it somehow possible to update parameter in parameter list (after calculating it in 2dscript)? If not, how can I use parameters that are not accessible in listing? Is there any other way to export parameter (to for example to properties)?
Thank you in advance!
rav668
6 REPLIES 6
Joachim Suehlo
Advisor
- Calucalate the Parameter in Master Script
- Overwrite the Parameter in Parameterscript with the Command PARAMETERS
(no need to calculate in 2D again)
Joachim Suehlo . AC12-27 . MAC OSX 13.5 . WIN11
GDL object creation: b-prisma.de
Lingwisyer
Guru
If you define something within a script other than the Parameter Script, it will overwrite what has been set in the Parameters. These can then be reflected back into the Parameter as Joachim has mentioned.



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
rav668
Participant
Thank you it works
Barry Kelly
Moderator
Also a tip when setting parameter values.
Don't just say ...

PARAMETERS door_width = 0.900

You should say ...

door_width = 0.900
PARAMETERS door_width = door_width

The first line will set the value of the parameter for use in the scripts.
The second will change the parameter in the list.
Otherwise it is possible for your scripts to be using a different value to what you see in the parameter list (you might want to just trust me on this one).

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
Lingwisyer
Guru
Does putting the "door_width = 0.900" in the Parameter Script actually do anything? I usually put them in the Master Script, thought that was the only one run before any of the other scripts.



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
Barry Kelly
Moderator
If there is a calculation involved in obtaining the value then I will usually do it in the Master Script.
Setting the value in the Parameter Script doesn't change it for the other scripts but then setting the parameter does which is why it is always a good idea to do that.

Also if the parameter is set in the Master Script it is a little more 'automatic' as the master script is run all the time (2D view, 3D view, opening object settings).
If the parameter is defined in the Parameter Script, then it will only update when you are adjusting the parameters (or simply open the object settings and press OK).
Usually this is not a problem as often you are adjusting the parameters in the settings so you don't notice.

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