Concatenate two lists

Hi all,

Im trying to Join 2 lists together and having some issues.
The list on the top is gathered from project parameters and are codes for Company, Country, State and Building name. These seem to concatenate quite well.
The list on the bottom are asset numbers. +600 line items and are concatenated values from project parameters.
All of these values are shared parameters included into the project and filled out.

What i want to do is place the top list (project data) to the front of every item in the bottom list. Almost like a prefix. As you can see from the result, i can almost get it but for some reason it only creates one line item not the +600 i was expecting? Im not too sure why. I have tried, List Join, Item add to front etc

Also, i would like to place as dash in between the two lists, but i cant work that out either.

Any help is appreciated.

It looks like it is a lacing issue. Try setting the String.Insert lacing to longest by right clicking the node.

Longest will only work if the toInsert input is only a single element. If you want a list of list of parameters to do this, I think you will have to use List.map. First try the one input with longest lacing and let us know how it goes.

This might be solved by simply flattening both list with the Flatten node.

Set lacing to longest on your String.Insert node.

Also you should update your version of Dynamo. With list levels like that you’ll benefit a lot from the list level features quite a bit.

Thanks for the replies,
I have tried everything that has been suggested but still no luck. Is there any other thoughts on how i can get this to work? Its driving me mad.

I have attached the graph. I really would appreciate any help with this.Concantonate.dyn (33.3 KB)

Can you provide a small test revit project?

hi all!

@Andrew_Harp try to cycle the item that you want to add to the front of the bottom list and then join them together.
If I understood well this is what you want. give it a try please :slight_smile:

Concatenate two lists - try.dyn (7.0 KB)

CONCATENATE TEST.rvt (924 KB)
Concantonate.dyn (34.3 KB)

So i have tried all of the solutions provided, thanks again and still cant get it to work.
I have attached a small sample project and the graph, so if anyone would like to have a look and help me it would be awesome.

Try This:

image

4 Likes

holy cow!! Salvatore for the win!
thank you, thank you thank you!! this has been driving me mad

1 Like

This works too:

image

Please mark the topic as solved

I now need to work out how to get this list back into a parameter in the project.
So the same families have a blank parameter called FM_ASSET ID, which needs to contain this concatenated list.
Thanks for your help, much appreciated