Got a minute? We appreciate your feedback:

Graphisoft Learn survey
About building parametric objects with GDL.

Reset Parameter to default based on specific parameter change


I have an A/C object that I would like to have a flexible slab. when we change the size of the unit (say from 12kW to 20kW) I would like the slab to change to suit the default size and then be stretchable after that. my problem comes when you reset to a smaller size unit and it maintains the larger slab.


My thoughts are to somehow get it to update to a default value when the kW parameter is changed and then allow a range of inputs. on the next kW change it would reset to the appropriate value for that size and then allow the stretch again. 


I don't know if i am maybe attacking this in the wrong way but I have googled my heart out and am at a wits end



The magic comes with the global called GLOB_MODPAR_NAME. It gives you the name of the last user modified parameter.

You could use it like this:

if GLOB_MODPAR_NAME = "size" then
  if size = 12 then
    parameters A = 1.0
  if size = 20 then
    parameters A = 2.0

This changes the dimensions ("A" being used as an example here) once. It is still fully stretchable and only changes again when you update the kWh unit size.

Lucas Becker | AC 27 on Mac | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

I have seen that command before but never quite fully understood it. Thanks for your help it worked a treat 😄

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!