Grasshopper

algorithmic modeling for Rhino

Hello

What is the Rhino Python script to bring a list from grasshopper to Rhino Python. For example, a list in Grasshopper reading:

John

Is

Stuck

With

This

Question

To the list in Rhino Python being:

gh_List = [John, Is, Stuck, With, This, Question]

 

Views: 611

Replies to This Discussion

1) Plug your your Grasshopper list into a GHPython input parameter.
2) Right-click this input parameter and set it to "List Access" (you can also specify a data type here, like string in your case)
3) The name of the input parameter will be the name of the variable within the scope the GHPython script.

Edit: If you mean being able to read the data through the EditPythonScript editor, you can add it to the sticky dictionary after passing it to a GHPython component. 

Wow that was a quick answer:

1. I posted the question

2. I walked to my canteen and bought a sandwich

3. Got back and you'd answered!

Thankyou! I'll give it a try...

No worries, you might be interested in the brand new Rhino Python Guides that McNeel posted the other day, looks like a terrific resource! Enjoy your sandwich :)

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