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

How to store values for later use?


My situation can be simplified to something like this. I'd like to store the values "A" and then turn it into previousA. And then store the values of "A" again when user change it, and turn it into currentA. So I can do something like:

differentA = previousA - currentA

Is there a way to do this?
Archicad 26, Windows 10, Corei7 3.4 GHz, 16 GB Ram.
Barry Kelly
Create parameters for ‘previous_A’ and 'difference_A'
Create a boolean parameter called ‘set_previous’
You don’t need a parameter for ‘current_A’ because that is ‘A’

if set_previous = 0 then
previous_A = A
PARAMETERS previous_A = previous_A
set_previous = 1
PARAMETERS set_previous = set_previous

difference_A = previous_A - A
PARAMETERS difference_A = difference_A

This will constantly give you the difference based on the original ‘previous_A’.
Now you can set a new value for ‘A’ and turn off the ‘set-previous’ switch and it will reset the ‘previous_A’ value and the switch will instantly turn back on again.
Type in a new value for A and you will have a new difference.

Not quite sure what you would want this for but it will work.

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
Thank you so much for your quick reply, Barry. I'll test/apply your idea asap.
Archicad 26, Windows 10, Corei7 3.4 GHz, 16 GB Ram.

Start a new conversation!

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!