List.IndexOf and List.GetItemAtIndex in nested lists

Hello everyone,

I have made a filter that filters out any line which is 0, 59.5 and 60 meters long.
I want to get the remaining values (/lines) out of this list. But i get only -1 as output.

Thanks in advance!

Set intersections like this are pretty computationally complex. Doubly so as you then have to find the index of the items in your original sublists. Two or nodes (||) to combine the equality checks into a single list of booleans prior to the filter by bool masks would be faster and easier to build. I also recommend using a not equal (!=) node instead of an equal node (==), as it makes life more understandable in these examples (well for me anyway) as you are filteri g out the 0’s, 59.5’s and 60’s.

You could also try design script, but watch your list levels carefully. Something like this:
DSCore.List.Clean(a != 0 || a != 59.5 || a != 60 ? a : null, false);

I will try this! Thanks for your help Jacob

Hey Jacob, unfortunately the filter you wrote doesn’t work for me. Even when i flatten my list it doesn’t filter out any of these 3 numbers. But i have found a simple solution without the need of design script codes: