Add String to String

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?

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

@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

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.

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