Combine Multiline Text Parameters

Hi,

The short question is:
How can use a value from one multiline text parameter, and combine it with values of other multiline text parameters?

This is the long explanation: I use Engipedia Layers Manager addon that transforms the structure of elements into a multiline text parameters. For example,

Floor 001 has a multiline text parameter “EN Layers and Widths” that has a value:

Ceramic Tile 1cm,
Cement Screed 5cm

Just bellow Floor 001, we have another floor. Floor 002 has a multiline text parameter “EN Layers and Widths” that has a value:

Concrete Slab 20cm

Bellow concrete slab we have a suspended ceiling. Ceiling 001 has a multiline text parameter “EN Layers and Widths” that has a value:

Air,
Substructure 4cm,
Gypsum board 1.25cm,
Skim Coat and Paint 0cm

Floor 001 will be hosting a component. With the help of dynamo, this component will detect all elements bellow (in this example, two floor elements, and the ceiling). I have no problem to use clash detection, but I don’t know how to combine the parameters afterward. I need to populate the multiline text parameter of the component that is hosted to the top floor. The parameter named “Assembly 1” should have this final value:

Ceramic Tile 1cm,
Cement Screed 5cm,
Concrete Slab 20cm,
Air,
Substructure 4cm,
Gypsum board 1.25cm,
Skim Coat and Paint 0cm

The reason being are building codes in my country. We can’t tag elements individually, we need to have a mark for the whole assembly instead. However, it makes no sense to create Revit assemblies for all floors, ceilings, roofs, and walls. Therefore, I want to use a component and place it wherever I need a tag. This component will detect all elements, describe them and assign unique marks to itself. It will be schedulable. The schedule of the component will describe all layers used in the project. It will be used for calculating building efficiency.

I just need help with combining multiline text parameters. Lets say I have three lists of multiline text parameter values.

List A has two items with values

Layer a1,
Layer a2

Layer b1
Layer b2

List B has two items with values:

Layer a3,
Layer a4

Layer b3
Layer b4

List C has two items with values:

Layer a5

Layer b5

I need a list D that has these two items as final result:

Layer a1,
Layer a2,
Layer a3,
Layer a4,
Layer a5

Layer b1
Layer b2,
Layer b3,
Layer b4,
Layer b5

Big thanks for your help.

You can join strings in a couple of ways. You can concatenate a list of strings into a single string (String.Concat or String.Join) or you can join two or more separate strings into a single string with a simple codeblock (string1 + string2 + ...stringN). You’ll likely need to use both in your case, although it’s not necessary. You could also combine all your values together into a sublist of values for each parameter and then combine them all at the same time.

As for making them multi-line, you just need to include a line break character between each value. You can do that by including a "\n" substring.

Can you please tell me why this graph i made isnt working?
The parameter of the component is not being updated.
I’m sending you the dynamo file and the revit test file.

Fizika.dyn (51.2 KB)

Can you start with just a screenshot and any images that may be helpful? Make sure you use Export as Image when you’re zoomed in enough to see the nodes (they don’t all need to fit on screen, Dynamo will export the full extents) and have all the node preview bubbles pinned. We should be able to get you sorted out pretty quickly.

In the meantime , I solved the problem by avoiding “EN Layers and Widths” and by detecting the actual layers of the structure. It works…
AN_Physics_Floors Ceilings Roofs.dyn (79.1 KB)