For example I have 3 lists:
L0 = 0,1,2;
after I filter 0 and 5 …I would like my result list to look like this:
What I have done, with the help of another topic is this, but it doesn’t seem right as the second statement overwrites the first one, I don’t want that… i want to be " it’s either number x or number y"
You just need a slight modification to your current formula:
You’re currently doing this:
Change it to this:
Your current approach is actually outputting two separate lists, one where your variable
a is compared to
0 and one where your variable is compared to
5. If you nest one test inside the other, it will evaluate to true if a == 0 or a == 5, otherwise evaluating to false.
An Or statement would work as well.
this is off-topic, noob question, what does the #3 in the list mean?
This particular syntax
(0..2)..#3..(1..3) equates to
(start)..size..(step). In this case, start and step are ranges themselvs, therefore the first range is
0..#3..1, the second is
1..#3..2 and the third is
Thanks a lot. understood now.
Thanks for the quick reply, I wish I would have posted earlier this problem;
Could you point me where I can find a manual on how to use the code block design code?
I couldn’t find anywhere about this information or the “| |”
Here is the full documentation for DesignScript.
|| is a
logical or operator.
It’s the same as the Or node. The best way to learn design syntax (code block design code) is to learn the nodes and how they work and then to use “Node to code” to convert them to the equivalent code block.