# Math.round Error

**URL:** <https://forum.dynamobim.com/t/math-round-error/108446>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [March 2, 2025, 11:13am UTC](https://forum.dynamobim.com/t/math-round-error/108446 "2025-03-02T11:13:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaymSanz](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@RaymSanz](https://forum.dynamobim.com/u/RaymSanz)\
**Post date:** [March 2, 2025, 11:13am UTC](https://forum.dynamobim.com/t/math-round-error/108446/1 "2025-03-02T11:13:49Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/0/b040201b5350826814ec7f803bb311ff4e6a57c3.jpeg)

---

<div class="post-metadata">

**Author:** ![BimAmbit](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bimambit/32/192629_2.png) [@BimAmbit](https://forum.dynamobim.com/u/BimAmbit)\
**Post date:** [March 2, 2025, 11:26am UTC](https://forum.dynamobim.com/t/math-round-error/108446/2 "2025-03-02T11:26:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![RaymSanz](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@RaymSanz](https://forum.dynamobim.com/u/RaymSanz)\
**Post date:** [March 2, 2025, 1:56pm UTC](https://forum.dynamobim.com/t/math-round-error/108446/3 "2025-03-02T13:56:38Z")

</div>

Hi,  
I still got an error 😂

 ![dyn err](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/d/0d0ea8bed03b0aef7f25302be6cfb54507e02bf9.jpeg)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [March 2, 2025, 2:10pm UTC](https://forum.dynamobim.com/t/math-round-error/108446/4 "2025-03-02T14:10:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [March 2, 2025, 2:15pm UTC](https://forum.dynamobim.com/t/math-round-error/108446/5 "2025-03-02T14:15:35Z")

</div>

hi  
try this

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/0/009ed590ca09dd45781c8bbeb0d7f76859ecab58.png)  
cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![BimAmbit](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bimambit/32/192629_2.png) [@BimAmbit](https://forum.dynamobim.com/u/BimAmbit)\
**Post date:** [March 2, 2025, 2:15pm UTC](https://forum.dynamobim.com/t/math-round-error/108446/6 "2025-03-02T14:15:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![RaymSanz](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@RaymSanz](https://forum.dynamobim.com/u/RaymSanz)\
**Post date:** [March 6, 2025, 11:07am UTC](https://forum.dynamobim.com/t/math-round-error/108446/7 "2025-03-06T11:07:26Z")

</div>

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

 ![math round error](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/5/a5fd9c6ce0e87472e405a2dee39330fd718f4ea3.png)  
[2024 revit version\_math round error.dyn](https://forum.dynamobim.com/uploads/short-url/9NNB0SirLTjPOkknnk7uOLpZgvN.dyn) (20.8 KB)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 6, 2025, 4:08pm UTC](https://forum.dynamobim.com/t/math-round-error/108446/8 "2025-03-06T16:08:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![RaymSanz](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@RaymSanz](https://forum.dynamobim.com/u/RaymSanz)\
**Post date:** [March 7, 2025, 4:59am UTC](https://forum.dynamobim.com/t/math-round-error/108446/9 "2025-03-07T04:59:37Z")

</div>

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

 ![math round error - SOLUTION](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/1/d186433a950af8f74abed6537d85864204ee8878.png)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 7, 2025, 2:47pm UTC](https://forum.dynamobim.com/t/math-round-error/108446/10 "2025-03-07T14:47:33Z")

</div>

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 != "";`
