PDA

View Full Version : 2020 Revit Number Parameters - remove trialing zeros



david_peterson
2020-04-27, 04:18 PM
So I had a team member that was trying to use Dynamo to import a list of equipment numbers into revit from excel. It wouldn't read them as a text parameter due to formatting in excel. So he changed the parameter to be a number.

So when you make a new parameter that is a "Number" parameter, by default (at least in our set up) it lists as "0.00000".
I can't set it to a unit because it's a unitless parameter. It's trying to display the equipment number which is 1001.1 as an example. Most of them don't have any decimal points, they are whole numbers, but a few of them do.

Anyway, I can't seem to find any spot where I can either change the units to have it stop at 1 decimal place or simply remove trailing zeros.

Anyone got any tricks or ways to accomplish this?
Let me know.
Thanks!

marmiketin
2020-04-28, 03:46 PM
Have you tried using the custom format in excel for the numbers and then setting "0,000.0" as the type. This might get around Revit not being able to read the value as text. I don't know of a way to fix this in Revit without using a macro or editing in the Dynamo script.