Hello,
Question of concept of numbers in Revit.
I am a bit curious what happens with the numbers when you get them initially in string format and you convert them into a number, because for small numbers, they appear displayed as 2*E^-10 for example and if I introduce this number into a Revit parameter which is a number it is displayed in same way, so not sure if that number is a number or just a text, not sure if I could sort a schedule as ascendent or descendent with those small numbers.
All of Revit parameter have âType of Parameterâ option so it canât confusingâŚ
If the Type of the Parameter is âTextâ, the value canât be âNumberâ, and vice versa.
1 Like
I know that for sure, but even being a number parameter, not sure if how the numbers displayed are an issue when you read in screen a number ending in E-12 for example. I am expecting that for example a number displayed as E-12 is lower than 1 in a schedule, so if I export to Excel for example I cannot sort by number I think, I would have to export a number like 0,000000000000001 instead of 1E-12.
In resume, by default all is a string, but if I want a number in Revit, the input needs to be a number, although it is displayed as scientific number when converted into a number, but if I want the number in a schedule not inside Revit, I think I have to make it work with full decimal numbers displayed instead, but maybe I am wrong, it is just a perception of behaviours with numbers
Excel should sort the number without issue, as it too should know itâs a number. That said this is a general Revit question in regulars to how your units are displayed. Check the project units settings and if that doesnât work you may get better answers over on a Revit forum.
1 Like
My ideal is use some code python scripts, multiply it to a large number and sort it, like this, or give it and convert again.
from decimal import Decimal
import math
lst = IN[0]
nums = []
for i in range(len(lst)):
nums.append(Decimal(lst[i])*100000000)
#example if you want convert
value = float('9.81E7')
OUT = sorted(nums, key=float),value
2 Likes