cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
GDL
About building parametric objects with GDL.
SOLVED!

Parameter update

concepsys
Booster

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

concepsys_0-1705953510811.png

 



1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Barry Kelly
Moderator

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.

 

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

View solution in original post

3 REPLIES 3
Mario Sacco
Expert

Can you share the object.

MacBook M1 Max 64GB- OS X 12.2.1 - Archicad 27
https://www.archiradar.it/en/
Solution
Barry Kelly
Moderator

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.

 

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Hi Barry, Thank you for your answer.

I have now changed the code to this 

concepsys_0-1706000479480.png

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.