Grasshopper

algorithmic modeling for Rhino

Hello,
I've a little problem, I'm new in Python
I'm using Human UI, and I want a pulldown list to choose from variables like A , B , C 
and I'd like to assign values for those variables.
A=1
B=2
C=3

So if I choose "A" I want to see  1 as a result on the last panel. ATM I see all the values

Can I do this with  IF/ELSE or somehow else ?  

Views: 1259

Attachments:

Replies to This Discussion

Like this?

Attachments:

ohhh yes, Thank you  :)

Python's also not necessary for this - I typically use "find similar" in cases like this, or even just use the index output from the value listener directly. Also, I'd recommend attaching the value listener directly to the "Create pulldown" component rather than the output from the "Add elements" component - both will work, but it will save you some headache later on.

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service