Get Parameter Value - Multi Row Text Problem!

Dear Experts,
There is something wrong with Dynamo / Revit integration for (Multi row text) and wonder if have any solution.
When we use getparametervalue to get text value with single row, everything is OK.
However, when we use getparametervalue to get text value with multi row, the value is not correct. Please see attached file. What can be reason for that? Thanks.
Test.dyn (16.1 KB)

A new line in DesignScript, just like a new line in code, is not the same as a line break. You can even see in your code block how the 2 isn’t recognized as text. You need to use the line break character (\n) to match the parameter value.


1 Like

Thanks for information, Nick. However, suggestion not worked for me. :frowning:

Unfortunately not all line breaks are created equal. Not sure which special character Revit uses if it’s not the same \n. You might be able to use some python magic to remove the break. Otherwise I’d suggest separating the strings with a blank ("") as the separator and compare the individual characters. That seems to work with different line breaks.

1 Like

It may also be a carriage return \r.

1 Like

Two things to try:

  1. Pull the length of the string with a string.length node. This will let us know if there is an extra line used internally for formatting or as a flag which isn’t displayed to the user.

  2. Try using ”1\r2” as @Robert_Younger pointed out.

1 Like

None of method working. So strange :frowning:
In the family double row value entered by coping from word or using alt enter. None of method working (Project file uploded for your review.).
Test.dyn (23.3 KB)

What is the result of string.length?

1 Like

Hi @kvusal can you share a simple revit file?

1 Like

Please find:
Project File.

Notice that there are four characters in the string. This means there is something we don’t see in the string itself.

Try using a String.Replace node to replace spaces with an underscore as a first step. In design script that would be something like String.Replace(str, ” “, “_”);

1 Like

Please find:

This appears to be the image from your prior post. What does the parameter’s string look like if you replace spaces with underscores?

1 Like

Sorry. Corrected screenshot. Please check above post.

Another one-off workaround you can try is to isolate the special character (with something like String.Substring) and copy it to your clipboard. I believe you can then paste it back into a string node and use that as your searchFor input when replacing.


That’s the next step. My guess is it is the character at index 1 or index 2.

1 Like

Hi @kvusal maybe try change “Code Block” with “String” node
Test_mod.dyn (44.0 KB)


1 Like

Dear Nick and Jacob, many THANKS for time and help. However, still no any result.
Dear Paris, thank you as well. Your suggesting worked normally, however i need to get text from revit not from dynamo. So when I am getting text from revit can not handle it as listed previous screenshots. Very upset about this dynamo bug.

@kvusal Looks like Revit adds “\r\n” as a line separator following the windows format.


Try this and it should work:


Dear Amol, Many thanks. I was about to give up about solution and considering Dynamo Bug. Many thanks again.

1 Like