Lists go mad

2 list equal of length… but the output is shorter…???

I guess the length of ‘kolom’ is 4.

Also if statements with different length list works a bit strangely, you can use list@levels in design script (code blocks) something like this way:
kolom?a@@-1:b@-1;
The double @@ means “Use list structure” you can only put that after one of the input lists. The number means the level of the list.

1 Like

i know about the problem with different lengths but here the lists are the same size… they come from a point one is x the other y so the lists are always the same…
They really should fix this IF statement problem.

I believe online there is some python code to do the if statement i will find that one and use it.

I just wanted to point out that even with equal lists it goes wrong.

I reread your problem, and it seems you didn’t miss this list@level but lacing. This is not a limitation of the if function, but designscript. In your example you want to use longest lacing, but in designscript there is only shortest and cross product.

If you want to try the cross product option instead of shortest, you can read about it here: https://primer.dynamobim.org/en/07_Code-Block/7-2_Design-Script-syntax.html#how-about-lacing

But the longest lacing option just duplicates the last element, so you can work around it by duplicating the last element in the kolon list

Please post a graph that shows the kolom input as well, as this appears to be a situation where you get five values for five true/false sets.

1 Like

i did use another approach…thanks again for responding Jacob your a great help to this forum appreciate it

1 Like