String formating(Numbers)

Hi,

I have switched from Revit 2022 to 2024, and encountered something that seemed strange to me, but perhaps there is just a setting I haven’t found yet.

Basically this keeps happening to me:


I assumed that a string should not do this. If I place any other character in front of it(or behind it) then it works as it should …

Any clues?

Michal

I would suggest you check that you have the latest version of revit 2024, if not get that update then re-check if you are having the same issue.

How to tie the Build number with the Revit update

I think this is a known and resolved issue where leading and trailing zeros were removed for the display of the string. To confirm it try a String.Length node to see if that returns a value of 1 (meaning the 0 is lost) or 2 (meaning the zero is just not displayed). To fix the later first confirm you have all the updates, then if so and it’s still blocking for your workflow, consider adding a prefix for display purposes, such as a zero width space. Just be sure to not use the display value in further calculations.

1 Like

Looks like @jacob.small is right

Ahhh, thanks guys, yeah it solved it.

@bvs1982 yes, I cant recall a post where he wasnt right :slight_smile:

I can - quite a few actually. :melting_face:

The joy of AEC tech is there are pretty much infinite ways to accomplish any goal. As such all answers are situationally dependent - you’ve got a different perspective than I do and can do things which I cannot.

So always trust but verify for your context, as I’m not sitting where you are. Least I think not - I’d hope you’d say hello if I was next to you. :laughing:

You’ll all probably be excited about this PR coming to a future Dynamo version then :slight_smile:

1 Like