Rounding Values

When i connect List.GetItemAtIndex to StringFromObject my values changes to 6 decimal places. How do i change StringFromObject Values to zero decimal places?

 

Untitled

Since you are getting a string from the number you can use String.RemoveAfterGivenCharacter from Rhythm.

2015-05-14_13h02_46

 

Thanks John, your the champ!!!

I have a similar problem, but I want to keep two decimals after the decimal delimiter. How can that be solved?

Sorry found a recent thread with an allroud solution (Python object to string).

I am probably overthinking a bit here. But see below for a solution. I can publish this to Rhythm as well.

2015-07-27_15h18_52

 

2015-07-27_15h25_14

Thanks, I’ll test it, the python code didn’t work because the input from built in Point.[X] nodes is a float internally and it gives a ton of trailing numbers.

See my last response and get the Rhythm package in the package manager. I tend to avoid python scripting and stick primarily to OOTB nodes.

Thanks, I redid your screenshot and it worked and I’ll get latest version of your package also. :slight_smile:

In my version I added a possibility to specify number of decimals and the separator (because I am living in an ISO country but my output requires a dot as separator).

John doesn’t say how you got the parameter String.RemoveAfterGivenCharacter)? I also have problems with rounding wanna try your method.

John already mention above.You need to install rhythm package. You can search rhythm package in dynamo or download from dynamopackages.com.

Good Luck!