# Why is it Null in the code block

**URL:** <https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464>\
**Category:** Dynamo Player\
**Tags:** revit\
**Created:** [June 7, 2023, 6:44am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464 "2023-06-07T06:44:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dexterdeluna122685](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dexterdeluna122685](https://forum.dynamobim.com/u/dexterdeluna122685)\
**Post date:** [June 7, 2023, 6:44am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/1 "2023-06-07T06:44:58Z")

</div>

Can somebody help me, what is the problem why it is Null in code block, I’m trying to subtract the List of coordinates from excel file.

 ![node](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/b/8ba0996257a2b82f62f3b6b00a1954a5c18b964f.png)

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [June 7, 2023, 6:49am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/2 "2023-06-07T06:49:26Z")

</div>

Hello @dexterdeluna122685 and welcome to the community…do you mean something here…

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/7/4760692006c29cc10902ed7944d158fbfbf0a2e2.png)

---

<div class="post-metadata">

**Author:** ![dexterdeluna122685](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dexterdeluna122685](https://forum.dynamobim.com/u/dexterdeluna122685)\
**Post date:** [June 7, 2023, 7:12am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/3 "2023-06-07T07:12:50Z")

</div>

Thanks Bro

 ![node](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/1/1113292b9c8704974e57fcad19435369f8e15235.png)  
Can you tell me a little bit more, what’s next to that code block so it will give final total?

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [June 7, 2023, 7:21am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/4 "2023-06-07T07:21:41Z")

</div>

Not really sure what you mean….you wanna count them or ??? Try give an exemple

---

<div class="post-metadata">

**Author:** ![dexterdeluna122685](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dexterdeluna122685](https://forum.dynamobim.com/u/dexterdeluna122685)\
**Post date:** [June 7, 2023, 7:24am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/5 "2023-06-07T07:24:20Z")

</div>

count them

---

<div class="post-metadata">

**Author:** ![dexterdeluna122685](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dexterdeluna122685](https://forum.dynamobim.com/u/dexterdeluna122685)\
**Post date:** [June 7, 2023, 7:29am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/6 "2023-06-07T07:29:09Z")

</div>

[![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/e/ee6f3cc741e8843beac091546666d2ebe19fb37a.jpeg "Modelling Piling from Excel using Revit and Dynamo") ](https://www.youtube.com/watch?v=vKpfnH1oDk0)

---

<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:** [June 7, 2023, 7:33am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/7 "2023-06-07T07:33:40Z")

</div>

List.Count will tell you how many there are.

---

<div class="post-metadata">

**Author:** ![dexterdeluna122685](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dexterdeluna122685](https://forum.dynamobim.com/u/dexterdeluna122685)\
**Post date:** [June 7, 2023, 7:35am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/8 "2023-06-07T07:35:52Z")

</div>

![node](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/0/500d735cc2a48c5ca224f321e6b1162b6810ab51.png)  
can you give me a solution to this. another node to give me the list which is already an answer

---

<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:** [June 7, 2023, 7:37am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/9 "2023-06-07T07:37:07Z")

</div>

Do you want to subtract value 1 from value 2?

---

<div class="post-metadata">

**Author:** ![dexterdeluna122685](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dexterdeluna122685](https://forum.dynamobim.com/u/dexterdeluna122685)\
**Post date:** [June 7, 2023, 7:38am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/10 "2023-06-07T07:38:52Z")

</div>

yes, but must be in listed like 1 to13

---

<div class="post-metadata">

**Author:** ![dexterdeluna122685](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dexterdeluna122685](https://forum.dynamobim.com/u/dexterdeluna122685)\
**Post date:** [June 7, 2023, 7:44am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/11 "2023-06-07T07:44:36Z")

</div>

![node](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/6/a68adb97511093decdde7a0ee5b4cb4e4c197797.png)

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [June 7, 2023, 7:48am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/12 "2023-06-07T07:48:33Z")

</div>

not sure but something here…be sure its all is number…

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/3/43ea03459a41554b7ae5bbe4277b1ae332cbe0d5.png)

---

<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:** [June 7, 2023, 8:11am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/13 "2023-06-07T08:11:43Z")

</div>

Remove the previous code block entirely.

Expand the preview of the data in the ‘easting’ group so we can understand what you are working with. Also wire an Object.Type node in after it so we can confirm all the data is a number of some sort.

---

<div class="post-metadata">

**Author:** ![dexterdeluna122685](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dexterdeluna122685](https://forum.dynamobim.com/u/dexterdeluna122685)\
**Post date:** [June 9, 2023, 4:33am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/14 "2023-06-09T04:33:54Z")

</div>

![node](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/3/93a9795c9461913cbf276d0f011fbea34252aac8.png)  
Hi, code block is not working I don’t know why?

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [June 9, 2023, 4:45am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/15 "2023-06-09T04:45:59Z")

</div>

Not sure,are you sure these are numbers, try tjeck it with the node objecttype…another thing is you have null in your list and looks like you have whitespaces…so i assume its a string and need to be converted to double…if you want then share your dataset and we can see whats goin on…

---

<div class="post-metadata">

**Author:** ![dexterdeluna122685](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dexterdeluna122685](https://forum.dynamobim.com/u/dexterdeluna122685)\
**Post date:** [June 9, 2023, 4:50am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/16 "2023-06-09T04:50:55Z")

</div>

I want to subtract list first item to list last item. is there anything nodes I can use to give me the answer on list

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [June 9, 2023, 4:54am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/17 "2023-06-09T04:54:24Z")

</div>

Yes i know what you want, but your input isnt right…you have null, whitespaces, and its probably a string…if i should go deeper into it i need the dataset…here i clean the list for null and whitespace…but probably better replace the null its depends…

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/4/4493a10b0badeb394713bc1a0ea63b0fae420b97.png)

---

<div class="post-metadata">

**Author:** ![dexterdeluna122685](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dexterdeluna122685](https://forum.dynamobim.com/u/dexterdeluna122685)\
**Post date:** [June 9, 2023, 5:44am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/18 "2023-06-09T05:44:22Z")

</div>

I wonder if you could help me fixing my problem in dynamo script, maybe I can send you the Dynamo file .dyn via email and fix it. sorry for bothering you. it’s just that I wanted to have a finish output on this script. thank you in advance

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [June 9, 2023, 5:47am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/19 "2023-06-09T05:47:11Z")

</div>

no worries…if you upload you dataset here…rvt, dyn file…you can upload here a link to webtransfer, filetransfer etc…and i will try to help you…

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [June 9, 2023, 6:15am UTC](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464/21 "2023-06-09T06:15:16Z")

</div>

Thanks…try as here

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/3/1331e0b951670114cfdec5346b9c9eed564e1121.png)

[Next page](https://forum.dynamobim.com/t/why-is-it-null-in-the-code-block/90464.md?page=2)
