# Add String to String

**URL:** https://forum.dynamobim.com/t/add-string-to-string/8018
**Category:** Uncategorized
**Created:** [December 6, 2016, 2:37pm UTC](https://forum.dynamobim.com/t/add-string-to-string/8018 "2016-12-06T14:37:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rgs](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/rgs/32/13536_2.png) [@rgs](https://forum.dynamobim.com/u/rgs)
#### Post date: [December 6, 2016, 2:37pm UTC](https://forum.dynamobim.com/t/add-string-to-string/8018/1 "2016-12-06T14:37:30Z")

</div>

Hello everyone

I’m currently trying to control my Dynamo Script with Excel. However, I’m having some difficulties with this.

It seems not to be possible to generate the same thing in string as in a codeblock.

I have tried to join the two strings by using “String.Concat” and “String.Join”, but it do not give me the same thing as i get in the codeblock.  
Can any of you guys maybe help me with this?

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/1/01ed88f69444e5d49a30ec3dd305a234bfa3603d.png)

---

<div class="post-metadata">

### Author: ![jostein\_olsen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jostein_olsen/32/8570_2.png) [@jostein\_olsen](https://forum.dynamobim.com/u/jostein_olsen)
#### Post date: [December 6, 2016, 2:49pm UTC](https://forum.dynamobim.com/t/add-string-to-string/8018/2 "2016-12-06T14:49:02Z")

</div>

My first response is: why? But then again, that is not my mandate to ask about… 🙂 If you reference the right libraries in a python script you can probably run the “eval” function on the string, like so:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/f/7fac33767522862a700320f8da7565b888e2f409.png)

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [December 6, 2016, 3:08pm UTC](https://forum.dynamobim.com/t/add-string-to-string/8018/3 "2016-12-06T15:08:04Z")

</div>

@rgs Is Code to Node your objective?  
If so, the node equivalent of what you’ve typed in the code block is not a string.  
Search for a node named _RebarType.ByName_

---

<div class="post-metadata">

### Author: ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)
#### Post date: [December 6, 2016, 3:11pm UTC](https://forum.dynamobim.com/t/add-string-to-string/8018/4 "2016-12-06T15:11:39Z")

</div>

The difference in output is quite distinct. When you use the code block, you are instantiating a `RebarType` object using the `ByName()` method. The string you are entering into this method forms the required input to get the output rebar.

Now contrast this with the string methods…and therein lies the problem; you are simply outputting another string. You are not instantiating a new `RebarType` object. To not use a CodeBlock then: find the `RebarType.ByName()` node and input (wire-up) the `"10 220S"` string, and you’ll get the result you are looking for.

---

<div class="post-metadata">

### Author: ![rgs](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/rgs/32/13536_2.png) [@rgs](https://forum.dynamobim.com/u/rgs)
#### Post date: [December 7, 2016, 7:37am UTC](https://forum.dynamobim.com/t/add-string-to-string/8018/5 "2016-12-07T07:37:29Z")

</div>

Ok Thank you every one.

i tried the python script, but i did not work for me.

the reason why i don’t use the “Rebar Bar Type” node is because, the users of my script find it to intimidating to do more then select an object with Dynamo.

So i wanted to create a Excel sheet, that they could fill out and the run it trough the script.

But i found a solution  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/6/a64e9f8a54895e135106c38d61c287fadd288835.png)
