Grasshopper

algorithmic modeling for Rhino

Hello all,

I am wondering if it is possible to pull the text from a component that I have custom named.  I am labeling point containers in grasshopper to keep them organized, but I am having trouble keeping their names organized in the output of my script. When I put the text into a panel and tag all the points, the names are all rearranged in rhino.  Does anyone know how I could fix this.  If I could pull text directly from the container I believe it will organize correctly.

Thank you for your time,

Sam

Views: 1014

Replies to This Discussion

Hi sam

i cannot help with the naming but it sounds like the orders are probably getting mixed up because of different data braches. If you can post an example it might be easy to rectify.

Here's one way of doing this...

The attached script takes the first input parameter and gets all the sources (i.e. the parameters connected to it). For each of these source parameters the nickname (the user changeable name) is found and appended to a list once for each item of data stored within that particular source parameter.

As such, it only works with lists, however with a little jiggery-pokery you could adapt it for trees.

I spotted a potential bug in the script – it was taking the first parameter, not the first input parameter. Updated definition attached.

Attachments:

Couldn't quite shake the feeling that there was a better way of doing this... I just found this post by David: http://www.grasshopper3d.com/xn/detail/2985220:Comment:810052

I've attached an updated script that now handles both tree structures and lists.

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