Grasshopper

algorithmic modeling for Rhino

Hi,
What methods are available to concatenate different strings into a single string?

Views: 11026

Replies to This Discussion

kermin,

Offhand I would say you need to use a function component ( F(x, y ,z...) etc. ) with an expression ( x & y & z... etc.).

I can't think of anything more clever (or more parametric/dynamic) than that at the moment.


-taz
You'd have to use a custom script component to concatenate multiple strings:


Set x as a List and of type String and put the following code inside the component:

Dim strPart As String
Dim strWhole As String
strWhole = ""
For Each strPart In x
strWhole = strWhole & strPart
Next
A = strWhole

BTW, I think the Mass Addition component should handle strings also, not only numbers.
Good point.

Cheers mate!

The future is now!

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