Using the IF function within the Dynamic Component

I have a nestles component (column) inside another component (module). The component (module) have the function to difference in lenY, X and Z.
The len Y can change into 4 different sizes. When changing the size I would like to move the nestled component (column) towards another y coordinate. That means that the column needs to move 3 times when changing the module.

I used this formula for the column: =IF(28_Module 2950_casco wand_kolom!LenY=980,613,568)

What I actually want is to add 2 more coordinates IF the module size changes towards another set size. How can I do this? Can the OR function help me in this? So yes, how?

Thank you guys in advance for helping me out.
Kind regards, Adan

Try to nest another if to formula.
Something like.

1 Like

@pupoksveta It worked! Thank you so much for your quick response

See below the formula I made (exactly the same you suggested):
=IF(28_Module 2950_kolom_kolom!LenY=980,349,IF(28_Module 2950_kolom_kolom!LenY=1100,377.7,IF(28_Module 2950_kolom_kolom!LenY=1180,422,281)))

Kind regards, Adan

You’re welcome.

@pupoksveta hi Miroslav I had another question regarding the same topic.

Ive changed my Width (LenX) attributes. When I update my formulas in the nestled components it does not work anymore. I just changed two attributes with 10cm.

I tried already to fill in the formula from skretch. And I also deleted the LenX values and filled it again. Did not work. Do you by any chance know how to fix this?

Thank you in advance. Adan

Hi @adanfinch ,
Try to upload the skp file that a could have a look.
Also give me info what you want to achieve.

201006 Finch modules dynamic_testversie.skp (1.4 MB)

Goodmorning, thank you for offering help.

The problem of the nestled components is that the columns (nestled components) don’t move along the x direction together with the total width (LenX) of the component.

Kind regards,

Perhaps the X value for the nested column positions that need to move, should have a formula that divides their parent’s component’s LenX value to get the spacing, and then multiply spacing by their copy number ?

I would build it as Dan suggested, however you could…

either or

Indeed both options are working. I see that I made a mistake by putting the wrong formula in the x (Position) field.

By putting =28_Module 2950_kolom_kolom!LenY=-20 in the x field it worked again.

Thank you again for your time and quick response. :slight_smile: