# Append string to parameter

**URL:** <https://forum.dynamobim.com/t/append-string-to-parameter/111597>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [July 31, 2025, 11:03am UTC](https://forum.dynamobim.com/t/append-string-to-parameter/111597 "2025-07-31T11:03:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![willyoungMF8K3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/willyoungmf8k3/32/201327_2.png) [@willyoungMF8K3](https://forum.dynamobim.com/u/willyoungMF8K3)\
**Post date:** [July 31, 2025, 11:03am UTC](https://forum.dynamobim.com/t/append-string-to-parameter/111597/1 "2025-07-31T11:03:46Z")

</div>

Hi all,

If anyone can give me a pointer on the below it would be much appreciated.

I’m trying to make a simple script to append a string to some existing parameters.

To be specific, adding a word to the end of 48 drawing titles which is a sheet parameter ‘Sheet name’.

I have got to the end of the script and all seems to be working fine, the string has joined correctly in the preview.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/0/e0f016a1090ec7b103dec50189d3435ad16392fe.png)

However when I run it on the Revit model it gives the error:

_Name cannot contain any of the following characters:  
\ : { } [] | ; \< \> ? ` ~  
or any of the non-printable characters._

It then replaces the first sheet name with FOUNDATIONS rather than appending

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/a/4a670e6b9f0860c1163aee0b9e297b5f5cf9aca9.png)

I’ve got a feeling it might be a levels issue but I have tried changing the levels with no success.

Please see below image and attached dyn.

 ![Append string to sheet title_2025-07-31_12-01-52](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/0/b0845860ba9dc2497a70fe2b742fd444ef4c25dc.png)

**This is using Revit 2025**

[Append string to sheet title.dyn](https://forum.dynamobim.com/uploads/short-url/uMLjExCC4YWKtXsrEBA9Z70UtZ8.dyn) (31.3 KB)

---

<div class="post-metadata">

**Author:** ![Andriy](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@Andriy](https://forum.dynamobim.com/u/Andriy)\
**Post date:** [July 31, 2025, 11:43am UTC](https://forum.dynamobim.com/t/append-string-to-parameter/111597/2 "2025-07-31T11:43:13Z")

</div>

Hi,

First of all, it’s a bit odd that you’re setting the parameter values to title block(?) instances rather then to sheets itself.

Second, you went pretty complicated way to achieve appended sheet numbers.

It’s much easier, if you’ll get all sheets, then get it’s names, create a code block and type a+”FOUNDATIONS”  
connect sheet names to a input, and you’ll get a result.  
Then just use Set parameterByName, connect sheets and new appended sheet names

---

<div class="post-metadata">

**Author:** ![willyoungMF8K3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/willyoungmf8k3/32/201327_2.png) [@willyoungMF8K3](https://forum.dynamobim.com/u/willyoungMF8K3)\
**Post date:** [July 31, 2025, 11:45am UTC](https://forum.dynamobim.com/t/append-string-to-parameter/111597/3 "2025-07-31T11:45:47Z")

</div>

Many thanks for these observations, I will give this a go and report back.

---

<div class="post-metadata">

**Author:** ![willyoungMF8K3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/willyoungmf8k3/32/201327_2.png) [@willyoungMF8K3](https://forum.dynamobim.com/u/willyoungMF8K3)\
**Post date:** [July 31, 2025, 11:59am UTC](https://forum.dynamobim.com/t/append-string-to-parameter/111597/4 "2025-07-31T11:59:36Z")

</div>

The suggestions have simplified the script a lot but unfortunately it doesn’t work, for some reason the string isn’t appearing in the preview of SetParameterByName?

Is there some extra step to set these parameter values that I’m missing?

[Append string to sheet title.dyn](https://forum.dynamobim.com/uploads/short-url/cFE9WnRkcCm5smgj7Voe2UnW5yH.dyn) (11.6 KB)

 ![Append string to sheet title_2025-07-31_12-54-46](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/e/8e88452fcf9cf6f420045bee86ae8cc475be7615.png)

---

<div class="post-metadata">

**Author:** ![willyoungMF8K3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/willyoungmf8k3/32/201327_2.png) [@willyoungMF8K3](https://forum.dynamobim.com/u/willyoungMF8K3)\
**Post date:** [July 31, 2025, 12:55pm UTC](https://forum.dynamobim.com/t/append-string-to-parameter/111597/5 "2025-07-31T12:55:25Z")

</div>

Just in case this will help someone else in future;

I swapped the get parameter by name node with Sheet.Sheetname, I think resolving the problem which was related to the parameter name being included in the string being replaced which had a colon “Sheet Name: “.

Thanks @Andriy for your help.

I’ve simplified further with set sheet name node and also added an input so it can be easily used with Dynamo player to append a string of text to all sheets in a project.

[Append string to sheet title.dyn](https://forum.dynamobim.com/uploads/short-url/frY9sKMB1bqm3VEqiVSqvruElVn.dyn) (10.4 KB)

 ![Append string to sheet title_2025-07-31_02-09-56](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/9/098cb13c28f0f584da6a19e9be50d21be690e6a1.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [July 31, 2025, 2:55pm UTC](https://forum.dynamobim.com/t/append-string-to-parameter/111597/6 "2025-07-31T14:55:32Z")

</div>

> [@willyoungMF8K3](#):
>
> get parameter by name

This gets the parameter element - you generally want to get the parameter value so the node to use is `Element.GetParameterValue...` not `Element.GetParameter...`

---

<div class="post-metadata">

**Author:** ![willyoungMF8K3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/willyoungmf8k3/32/201327_2.png) [@willyoungMF8K3](https://forum.dynamobim.com/u/willyoungMF8K3)\
**Post date:** [July 31, 2025, 3:08pm UTC](https://forum.dynamobim.com/t/append-string-to-parameter/111597/7 "2025-07-31T15:08:20Z")

</div>

I’m with you, many thanks Jacob.
