cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
MichaelIserief
Contributor

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

1 Solution

Accepted Solutions
runxel
Moderator

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
  endif
  if size = 20 then
    parameters A = 2.0
  endif
endif

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 29 on Mac (Sequoia) | Graphisoft Insider Panelist | Akroter.io – high-end GDL objects | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text

My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

Go to post

2 Replies 2
runxel
Moderator

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
  endif
  if size = 20 then
    parameters A = 2.0
  endif
endif

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 29 on Mac (Sequoia) | Graphisoft Insider Panelist | Akroter.io – high-end GDL objects | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text

My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
MichaelIserief
Contributor

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!