# Concatenate two multiline parameters

**URL:** <https://forum.dynamobim.com/t/concatenate-two-multiline-parameters/55776>\
**Category:** Developers\
**Created:** [October 1, 2020, 7:56pm UTC](https://forum.dynamobim.com/t/concatenate-two-multiline-parameters/55776 "2020-10-01T19:56:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hrasmussen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hrasmussen/32/104399_2.png) [@hrasmussen](https://forum.dynamobim.com/u/hrasmussen)\
**Post date:** [October 1, 2020, 7:56pm UTC](https://forum.dynamobim.com/t/concatenate-two-multiline-parameters/55776/1 "2020-10-01T19:56:36Z")

</div>

Hey all,

Currently I’m importing info from two columns an excel spreadsheet. In both columns, info is stored in one cell with multiple return lines in it. I’m porting that information to multi-line parameter in Revit. Works great. I’d now like to be able to concatenate those parameters into one item. Example

Cell 1

- Cell 1 line 1
- Cell 1 line 2
- Cell 1 line 3

Cell 2

- Cell 2 line 1
- Cell 2 line 2
- Cell 2 line 3

becomes:

- Cell 1 line 1 + Cell 2 line 1
- Cell 1 line 2 + Cell 2 line 2
- Cell 1 line 3 + Cell 2 line 3

Not sure how to accomplish this, since the info inside each cell is read as 1 item not a list. Any thoughts?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![AmolShah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/amolshah/32/103244_2.png) [@AmolShah](https://forum.dynamobim.com/u/AmolShah)\
**Post date:** [October 1, 2020, 8:02pm UTC](https://forum.dynamobim.com/t/concatenate-two-multiline-parameters/55776/2 "2020-10-01T20:02:29Z")

</div>

@hrasmussen See if this helps  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/5/459bf1140b01578e4c0a9ae37213b62ce2182ff1.png)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/2/7211b7e3419237e6a9f67060c777bd3cb0ed5c3b.png)

---

<div class="post-metadata">

**Author:** ![hrasmussen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hrasmussen/32/104399_2.png) [@hrasmussen](https://forum.dynamobim.com/u/hrasmussen)\
**Post date:** [October 1, 2020, 10:06pm UTC](https://forum.dynamobim.com/t/concatenate-two-multiline-parameters/55776/3 "2020-10-01T22:06:45Z")

</div>

@AmolShah - nice. That was the solution. Put it all inside a Python node and posted here for posterity. It’s part of a larger script so ignore stuff that doesn’t seem to be doing anything.

 ![working](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/0/20001b457c2a41bf476ecd712e50176a45be0da1.png)

```
import clr

clr.AddReference('RevitNodes')
from Revit.Elements import *

clr.AddReference('DSCoreNodes')
from DSCore import *

clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference("RevitServices")
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

params = IN[0]
valueList = IN[1]

output = []
errs = []

for values in valueList:
	optioncodes = values[7].Split("\n")
	options = values[8].Split("\n")
	templst = []
	for optioncode, option in zip (optioncodes, options):
		templst.append(optioncode + " - " + option)
	output.append(templst)
# Return results...
OUT = output
```
