Get items between indexes

Hello!
Is there a posibility to drop all items from a list up to a certain index and after a certain index?
The other way could be to get all the values inbetween these two indexes (indexes included).


Looking at the image, I would like to get only the values between the true values in the list (from 14 to 112 including the two).
The script itself is meant to place cross-sections on certain points that would come from this list.

Just create a sequence of those specific indices (index_start..index_end;) and then get the items at those indices.

I actually found a way to do it like this

1 Like

Hola amigo @alvis.narmonts buenas. You want to evaluate values within a range? is that it? I’m not so good in desgin script, perhaps is a more efficient logic sentence to make the evaluation.

That works too. It’s basically the same thing except using a slice length (why you have to increase the end index by one) instead of the actual indices.

1 Like

If i understand correctly, i should insert a node here?

The easiest thing to do is just use a Code Block with the DesignScript I provided in my comment. That’s the shorthand for an alphanumeric sequence. The List.Slice or Sequence nodes are variations of that same idea but based on a length instead of two indices.

1 Like

Understood how to do it. Thanks.
As you said before, it’s the same as the way that i found, just no need to ad the +1.

1 Like