Multine lists to simple lists

Super simple task but dont know a way:

Thanks

That’s not possible. Unless you want each of those items to be “blablablablablabla” as one combined item each. Then depends on the data how you join them. Every item always has an index.

like impossible impossible or impossible with standard GH components?

would be interessting to know why you would like to do so

because multiline data (it is a list of things) comes from excel it is multiline naturally but i need whole column as one text

It’s not the way lists work or indices. Think of it like this this. You are trying to give 3 houses next to each other the same address. This is gonna be really confusing for the mailman.

i know but it makes sense when you say: take all lines (indices) put them next to each other and put “enter (new line)” behind every item

That’s something you should do in code when translating to excel. Not something you should (or even could without it being one object) do to the grasshopper list. It just doesn’t think that way. So you should have some code then that says like:

For each branch, list each item in that branch to the following cells below each other.

What I am trying to say is. You could display it in gh the way you said but that they will then be considered one object.

blah (new line)
blah (new line)
blah (new line)
blah

That becomes one object.

You can see here it reads all that as two objects instead of 8.

Not as simple as you thought, eh? I told you so.

my friend helped with the script i am posting it so others might find it useful someday

multiline_list_to_simple.gh (13.5 KB)

If I wanted to do what you ask (which I don’t!), I would do it this way using Text Join, simple, without any complex C# code.


multiline_list_to_simple_2021Jan20a.gh (11.0 KB)

But doing this is just wrong. You can’t use data that way unless you split it apart again.

2 Likes

ou i opted for script because i got an answer its impossible :slight_smile: using “enter” character it text join is clever.