Grasshopper

algorithmic modeling for Rhino

Hi all,

I need to get a string of delmited values into a list. Is there a component that can do this or do I need a VB script? I've looked at some of the parsing example scripts but cannot seem to get any to work.

Any help would be greatly appreciated.

Thanks
Neill

Views: 1738

Replies to This Discussion

Hi Neill,

very few String operation components available so far. I think you'd better resort to scripting.
What does your String look like? (that's String with an upper case S, no dirty pictures please)

--
David Rutten
david@mcneel.com
Poprad, Slovakia
This actually shouldn't be that hard to script. All strings support a method called Split, which you can use to specify the delimiting character, and get an array of separate items for the results. See the attached script for an example. Just replace the "_" character with the one you're looking to split.
Attachments:
Thanks Damien. Your script works a treat and was so much simpler than what I was thinking!

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service