Math.round Error

Hi,
Why I am getting error at Math.round. I am trying to extract window width and height parameters and bring it to Excel

Try List.Clean → Object.Type → List.UniqueItems and check the output, see if there’s anything strange.

1 Like

Hi,
I still got an error :joy:

Some of your elements don’t have a parameter value. Those will need to be filtered out before you progress. Preserve indicies to false on the list.clean node should work, but depending on your end goal you might want to filter the elements by testing if the parameter’s value is null.

3 Likes

hi
try this


cordially
christian.stan

3 Likes

the thing is some of the revit parameter values are null before assigning it for the first time. like checkbox for example, its null at first though it looks false.

2 Likes

Thanks to all of you. but I still not getting it. Appreciate all the help I can get :slight_smile:


2024 revit version_math round error.dyn (20.8 KB)

The values aren’t null, they’re empty. You need to use the condition that @christian.stan suggested of checking for empty string values (data=="";). The null comes from trying to round an empty string.

3 Likes

Thanks @christian.stan @Nick_Boyts and everyone :), appreciate you all

1 Like

Just as an FYI, you don’t need to invert the boolean values before you filter. The in and out outputs are for true and false values respectively. You can just use the out port instead to get the false matches. In a case where you really do need the not condition, you could just include it in the original statement: data != "";

2 Likes