Grasshopper

algorithmic modeling for Rhino

Hi there,

I have a problem that seems so fundamentally simple but I just -can't- figure it out. Sorry if this already been answered before, I have done quite a bit of searching but might not have searched for the right keywords.

So to my problem. I have two numerical lists, A and B and I want to create numerical list C. 

A: index 0-8759, values 0-100, several branches

B: index 0-99, values 0-100, one branch

C: index 0-8759, same amount of branches as A.

For every value in list A I want to use that value as a index lookup in list B and use the value in list B in list C with the index from list A. Might not be so clear, quite hard to explain well.

For example:

A: index 2000, value: 45

-> look up value at index 45 in list B:

B: index 45: value 80

-> add value to list C with index from list A:

C: index 2000: value 80

or:

A: index 5814, value: 60

-> 

B: index 60: value 35

->

C: index 5814: value 35

I've attached a GH file to further explain my problem.

Thanks in advance!


R

Views: 698

Attachments:

Replies to This Discussion

Just [List Item] right?

Oh dear, that was way simpler than I thought. 

Thanks David!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service