ToString - Format

Hello dear professionals!
I have a question about one node (revit 2024)

there is a similar node to the above but for the string instead of the element, just can not find it now
Can somebody advise what patterns (formatting) it expects ???
I need to convert a number 5.12345 to a string 5.12.
Tried some from internet including python’s. Nothing works

String.FromObject > String.SubString

Is a way.

Maybe Math.Round?

you can use Python f-string

1 Like

String from Object is the generic node but it doesn’t allow for specific formatting. Once you have a string, you can use any of the common methods listed above to format that string to your liking.

thank you for your reply.
I just was curious if there is a way to make a native dynamo node useful that seems to be capable to get such things done in a clean way, to have something for a code block. But looks like it is there for no use and old ways still should be used

What do you mean by this?

You can always use node to code :backhand_index_pointing_down:.