2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations
2024-01-22
09:01 PM
- last edited on
2024-01-24
08:50 PM
by
Laszlo Nagy
I am developing a door element. I want to change several associated parameters according to the one the user will change, such as egress, leaf size, etc.
Everything works fine except for a single parameter that I have named "leaf_size".
When I change any one of the other parameters all the associated parameters will immediately change and show the correct value, except this one. On the first value edit, all the others will update but not this one. On the second value edit, (without closing the settings window), again all the parameters will update and this will show the value it should have shown in the previous edition.
I believe this is not the first time this has happened to me.
What am I missing?
here's the code
Solved! Go to Solution.
2024-01-23 01:52 AM - edited 2024-01-23 01:54 AM
Just looking at it quickly it seems OK - I don't see any obvious errors.
Logically it seems to be in the correct order to do what you want, but is there more to the script we can not see?
One tip however is never just script ...
PARAMETERS wall_hole_size = egress + frameX + frameX
You should type ...
wall_hole_size = egress + frameX + frameX
PARAMETERS wall_hole_size = wall_hole_size
This sets the value of the parameter to be used in the scripts as well as setting the value of the parameter you see in the parameter list.
There is a difference.
This applies to all of the PARAMETERS you are setting.
Maybe that will make a difference?
Also I tend to put GLOB_MODPAR_NAME commands in the master script - but that may just be me.
Barry.
2024-01-22 11:12 PM
Can you share the object.
2024-01-23 01:52 AM - edited 2024-01-23 01:54 AM
Just looking at it quickly it seems OK - I don't see any obvious errors.
Logically it seems to be in the correct order to do what you want, but is there more to the script we can not see?
One tip however is never just script ...
PARAMETERS wall_hole_size = egress + frameX + frameX
You should type ...
wall_hole_size = egress + frameX + frameX
PARAMETERS wall_hole_size = wall_hole_size
This sets the value of the parameter to be used in the scripts as well as setting the value of the parameter you see in the parameter list.
There is a difference.
This applies to all of the PARAMETERS you are setting.
Maybe that will make a difference?
Also I tend to put GLOB_MODPAR_NAME commands in the master script - but that may just be me.
Barry.
2024-01-23
10:08 AM
- last edited on
2024-01-24
08:50 PM
by
Laszlo Nagy
Hi Barry, Thank you for your answer.
I have now changed the code to this
and it works fine.
Come to think of it it, maybe this makes sense to prevent infinite circular references. I suppose there must be a limit for parameter updates. If not, everytime one condition was met, the other conditions would change other parameters that would possible run their own change codes and so on. Maybe?
This is a print screen from the archicad opened on my home laptop without a key, because I forgot to upload it from the office computer.
This "trial" version wont allow me to copy paste this code.
Anyway it works now.
Thank you again.