We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

How can I adjust A and B and the same time?

JGoode
Expert
Hi,
I am trying to adjust my object using A and B in proportion to eachother. I just need A to equal B and visa versa. Any help?

Thanks
ArchiCAD 23

Windows 10
4 REPLIES 4
Anonymous
Not applicable
JGoode wrote:
Hi,
I am trying to adjust my object using A and B in proportion to eachother. I just need A to equal B and visa versa. Any help?

Thanks
! Master
PARAMETERS A=B
Barry Kelly
Moderator
To make it a 2-way interaction I would add this to the master script.
if GLOB_MODPAR_NAME = "A" then
	B=A
endif

if GLOB_MODPAR_NAME = "B" then
	A=B
endif

PARAMETERS A=A, B=B
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
JGoode
Expert
Barry wrote:
To make it a 2-way interaction I would add this to the master script.
if GLOB_MODPAR_NAME = "A" then
	B=A
endif

if GLOB_MODPAR_NAME = "B" then
	A=B
endif

PARAMETERS A=A, B=B
Barry.
Thanks, this worked nicely. Do you know if there is a way to get A to scale with B whilst keeping the same ratio? for example;
A = 1
B = 0.6

then

A = 2
B = 1.2


A = 4
B = 2.4... If that makes sense.

This is currently in my script but it doesn't keep them in proportion. Any ideas?

mulx A/0.01425853658068
muly B/0.01284951110122

I want the same effect as if they were 'chained' after being placed but set inside the object.
ArchiCAD 23

Windows 10
Barry Kelly
Moderator
If you want the ratio adjustable by the user then I would set up a new parameter for the ration of B compared to A.

ratio = 0.6
if GLOB_MODPAR_NAME = "A" then 
    B=A*ratio 
 endif 

 if GLOB_MODPAR_NAME = "B" then 
    A=B/ratio 
 endif 

 PARAMETERS A=A, B=B 
Now you can adjust the ration parameter to whatever you want in each object.
If it will always be fixed at 0.6 then forget the 'ratio' parameter and just substitute '0.6'

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