# Numbers to string?

**URL:** <https://forum.dynamobim.com/t/numbers-to-string/108363>\
**Category:** Uncategorized\
**Created:** [February 26, 2025, 10:15pm UTC](https://forum.dynamobim.com/t/numbers-to-string/108363 "2025-02-26T22:15:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsucciXHCQR](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@gsucciXHCQR](https://forum.dynamobim.com/u/gsucciXHCQR)\
**Post date:** [February 26, 2025, 10:15pm UTC](https://forum.dynamobim.com/t/numbers-to-string/108363/1 "2025-02-26T22:15:08Z")

</div>

How do I remove trailing zeros when converting Doubles to string?

Second question: where is the documentation fo the node: “Element.ToString”?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/6/b6aa40747a54fbe9dfe89a315a38817b1ab9c358.png)

Thank you!

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [February 26, 2025, 10:36pm UTC](https://forum.dynamobim.com/t/numbers-to-string/108363/2 "2025-02-26T22:36:14Z")

</div>

The trailing zeros are specifically because you’re converting from a double. Instead, convert to an integer first (`Math.Floor` is an easy option) and then convert to a string.

As for node documentation, right-click the node then Help. Or you can look up nodes on Dynamo Dictionary.  
[Dynamo Dictionary - Element.ToString](https://dictionary.dynamobim.com/#/Revit/Elements/Element/Action/ToString)

---

<div class="post-metadata">

**Author:** ![gsucciXHCQR](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@gsucciXHCQR](https://forum.dynamobim.com/u/gsucciXHCQR)\
**Post date:** [February 26, 2025, 11:36pm UTC](https://forum.dynamobim.com/t/numbers-to-string/108363/3 "2025-02-26T23:36:13Z")

</div>

Great, thank you.

However, how do I go from 10.5000 to “10.5”?

Also, the Dynamo dictionary has no details on the nature of the data to feed that node.

Thank you.

---

<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:** [February 26, 2025, 11:43pm UTC](https://forum.dynamobim.com/t/numbers-to-string/108363/4 "2025-02-26T23:43:46Z")

</div>

String.Replace `“0”` with a `“ ”`, then use a a String.TrimTrailingWhitespace, then replace the `“ ”` with a `“0”`.

The dictionary hasn’t been updated since about Dynamo 2.4 - maybe older. Documentation can be found in the product now instead - place the node, highlight it, and hit F1 (might pull up the Revit help too) or right click and select ‘help’.

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [February 27, 2025, 12:00am UTC](https://forum.dynamobim.com/t/numbers-to-string/108363/5 "2025-02-27T00:00:01Z")

</div>

This has been a discussion on the forums for at least the last decade… anyhow - there’s a node for that; Spring Nodes _Number.ToString_

Also fairly trivial to accomplish with python

 ![number_to_string](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/d/2d67e18831a6c6b992d22f3e2295e06d07fe0654.png)

---

<div class="post-metadata">

**Author:** ![gsucciXHCQR](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@gsucciXHCQR](https://forum.dynamobim.com/u/gsucciXHCQR)\
**Post date:** [February 27, 2025, 12:30am UTC](https://forum.dynamobim.com/t/numbers-to-string/108363/6 "2025-02-27T00:30:11Z")

</div>

yeah, NumberToString was not working, for some reason…

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

---

<div class="post-metadata">

**Author:** ![jasonlkw](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jasonlkw/32/191737_2.png) [@jasonlkw](https://forum.dynamobim.com/u/jasonlkw)\
**Post date:** [March 12, 2025, 3:07pm UTC](https://forum.dynamobim.com/t/numbers-to-string/108363/7 "2025-03-12T15:07:49Z")

</div>

![Number to String_2025-03-12_11-06-21](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/a/cae236d2bf5df3498939296b21dde9431b073006.png)  
hope this paints a clearer picture.  
seems like although it’s showing the decimal values, it does not seem to affect the output.  
not sure what it does when setparam to the parameter values on revit though.
