Grasshopper

algorithmic modeling for Rhino

Hi,

If I've filtered a longer list to only those items that satisfy given criteria, how can I output the index numbers of the remaining items?

For example, if I have a 10-item list - 0-9 - and only items 3,4,7,8 return true, how can I return those index numbers (3,4,7,8) in their own list?

Thanks,
Justin

Views: 3823

Replies to This Discussion

Try creating a series that starts at 0, step size 1, with list length as the count, and then using a cull pattern to extract only those numbers corresponding to "true" values.
Hey, thanks for your response Andrew. That seems to do the trick.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service