Hi all,

Can someone tell me is there any way to use a conditional formula for the last copy of a component?

For an example:

if(last copy of a component’s! lenX = 5, then value, else value)

thanks in advance

Hi all,

Can someone tell me is there any way to use a conditional formula for the last copy of a component?

For an example:

if(last copy of a component’s! lenX = 5, then value, else value)

thanks in advance

the last copy would be at copy=copies, so

```
lenx =if (copies=copy, remainder, full distance)
```

If you are working on 2D array:-

based on if being true if >0 or false if<=0, can simplify if(value,1,0)

if copy to be changed at end of row, then take integer from real to see if remainder…

```
lenx =if((copy+1)/num in row-int((copy+1)/num in row), full length, remainder)
```

so say copies =5, num in rows =, remainder =7, full length =10

then if copy =0,

lenx= 1/3-int(1/3) = 0.333 -0 = 0.333, which is true, so lenx=10

for copy =1

lenx =2/3-int(2/3) = 0.667 -0 = 0.667 which is true, so lenx=10

for copy =2

lenx =3/3-int(3/3) = 1 - 1 =0 which is false, so lenx=7

4/3-1=0.333 true

5/3-1=0.667 true

6/3 -2 =0 false

and so on

1 Like

Is that possible to use same like this to another component?

for an example:

if the component#1 has 5 copies.

I have to use the condition in component#2

if the component#1’s last copy’s length=5, then component#2’s length=10, else value

is this possible?

if allowed component#2 to always be last, then component#1 copies = number - 2

or a condition copies =number-if(remainder,2,1)

component#2 position would be (length of component#1)*(number - 1)

and its length =if(remainder,remainder, 10)

hidden = if(remainder,0,1)

please upload example, then can correct syntax to suit

Condition example.skp (340.5 KB)

for an example I uploaded a file here. Here,

component 1 has 5 copies. each copy is at 5cm equal spacing except last copy. last copy is 35cm.

What I want here is,

component 2’s length wants to depend on component 1’s last copies position.

if the component 1 last copy’s position =35cm , then component 2’s length = 10, 15

I understand this is a simplified version of the problem and this soloution is simple and may not required.

Condition example (1).skp (344.3 KB)