Index of Item in List

Why isn’t this generating a list of the indices of the values that I am searching for? I’m almost certain that they are all in the list?

questions.gh (7.7 KB)

Can‘t explain it professionallly, but List index works just if they are right the same items, like id in gh. Use create set and member indices instead. This normally works :slight_smile:

2 Likes

Hello, it seems that you are looking for list item instead of item index. List item needs the index of the items you are searching for in a list giving you the chosen items. Item index iss looking for items that are matching the description in i.

“You almost never want to use [Item Index]. It doesn’t do what you think it does. Use [Member Index] from the Sets panel instead.” D.Rutten.

It’s handy in that it looks up items index by its original list order, not meant to match values and won’t work once the item is deconstructed further down the script.

1 Like