Semicolon

Hi,

Is there a way to put a semicolon in a code block as text? What escape character should be used?

If inputting into a Code Block, you’ll want to put it in as a String. Have you tried putting it into the Code Block like: “;” ? The quotation marks demarcate a String which is in essence text.

yes I used quotations marks, but Dynamo automatically changes the place of those and puts the semicolon at the end. Well not with a single semicolon. But when I put “Param1; Name1; Value1”; then Dynamo automatically puts returns after the semicolons.

If you want your defined variables to be on a single line, you could add them to a list by using curly brackets like so:

{param1,name1,value1};

You’ll still be able to interact with them individually inside the code block. Tho I don’t see the benefit of doing so. We’ll be able to help more with some more background information.

Capture2

In the Netherlands we use semicolon as separators in csv files. I would like to exchange parameters between different solutions using existing csv files. If I use a comma as separator I get into trouble if the parameter contains e.g. x,y,z values.

What are you putting into the code block exactly? The values separated by semicolons?

If that’s the case, here’s a “hacky” fix. Simply use another character in your code block and replace it with the semicolon.

2015-03-18_15h27_41

Thank you for the report. The issue is being tracked internally (MAGN-6713).

Thanks John. I didn’t think of using an input string node. I can probably use that to build the input for a csv file correctly through string.concat. But indeed the Code Block should have the possibility to use semicolons. Thanks for addressing this in next version Colin.

Hacky solution for replacing semicolon with a comma - dig out semicolon from a text =