Auto Room Number

Trying to create a Script that renumbers rooms based on a line. I know ArchiLab once had a custom node, but seems to have been removed? I am trying to remove trailing 0s and that pesky decimal. I have tried a custom node called RemoveZeros2, which worked great but the decimal stayed giving an awkward ###. result. I have tried using the String.Remove node but it forces me to keep at least 1 decimal. I know the issue is coming from the String from Object, but I am wanting the String information to be a whole number rather that a decimal. I have done the String.toNumber which removes all the decimals but the Element.SetParameterbyName node is expecting a string or a nonnumber item per my understanding. Any guidance?

Looks like you might need a Revit update, but you can use a String.Replace node to change the “.000000” to an empty string ””.

Sweet baby daffodil! Thank you Jacob! That got what I needed! Just couldn’t find he right node! Been years since I’ve dabbled in Dynamo. Thanks a lot!

1 Like