# Number input node switching back to integer when reopening script

**URL:** <https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224>\
**Category:** Civil 3D\
**Tags:** dynamo\
**Created:** [July 28, 2022, 12:53pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224 "2022-07-28T12:53:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kovacsv](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kovacsv](https://forum.dynamobim.com/u/kovacsv)\
**Post date:** [July 28, 2022, 12:53pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/1 "2022-07-28T12:53:47Z")

</div>

Hi,  
someone please explain me why does the number input (double) node convert the 1 or 2 decimal values to integer when I reopen the script? This reset applies to the Player as well and very annoying as I can’t define 1-2 decimal default values.  
 ![number](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/4/84fba088f655bca71ac938134aca7f06baf22be4.gif)  
 ![number2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/8/5887725c215a0854fecc8fa6dc2076a4eb57a2dd.gif)

---

<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:** [July 28, 2022, 1:13pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/2 "2022-07-28T13:13:42Z")

</div>

Can you give us the Dynamo version you’re using? Can you replicate this in other versions? Does a code block work?

---

<div class="post-metadata">

**Author:** ![kovacsv](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kovacsv](https://forum.dynamobim.com/u/kovacsv)\
**Post date:** [July 28, 2022, 1:39pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/3 "2022-07-28T13:39:57Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/a/fa38840e284523c7920a70ef87de20e170b93c8b.png)  
I can replicate this in C3D 2022.1.2 Dynamo 2.12  
Code block works, but I cannot use that as input. I can use number slider instead, but the number node would fit better.

---

<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:** [July 28, 2022, 2:15pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/4 "2022-07-28T14:15:36Z")

</div>

Odd. No issues on my end with Dynamo for Revit. Can you try removing all custom package locations and disabling any C3D add-ins? You might also try replicating the problem in sandbox.

@zachri.jensen have you ever seen anything like this in C3D?

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [July 28, 2022, 2:38pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/5 "2022-07-28T14:38:01Z")

</div>

Woah. That is super weird. Never seen that before! I’ll try to do the same on my PC here in a bit.

---

<div class="post-metadata">

**Author:** ![Anton\_Huizinga](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/anton_huizinga/32/155377_2.png) [@Anton\_Huizinga](https://forum.dynamobim.com/u/Anton_Huizinga)\
**Post date:** [July 28, 2022, 2:43pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/6 "2022-07-28T14:43:15Z")

</div>

> [@Nick\_Boyts](#):
>
> have you ever seen anything like this in C3D?

I did see this once, but can’t replicate it. Since then I alwas use a Code Block.

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [July 28, 2022, 2:50pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/7 "2022-07-28T14:50:11Z")

</div>

@Michael_Kirschner2  
Is this a known issue?

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [July 28, 2022, 3:38pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/8 "2022-07-28T15:38:20Z")

</div>

I just tried in C3D 2023 and Dynamo 2.13 and can’t replicate the issue. After you save, what does the .dyn value say for the input value?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/b/9ba41206503d99aaa0e7d7d8aced500f9a3a02cf.png)

---

<div class="post-metadata">

**Author:** ![kovacsv](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kovacsv](https://forum.dynamobim.com/u/kovacsv)\
**Post date:** [July 28, 2022, 3:49pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/9 "2022-07-28T15:49:15Z")

</div>

Hmm, that’s interesting 😃  
 ![number3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/b/9b1b38b60983528bdaf0243686ecaad4a133b1af.gif)

---

<div class="post-metadata">

**Author:** ![Michael\_Kirschner2](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/michael_kirschner2/32/75576_2.png) [@Michael\_Kirschner2](https://forum.dynamobim.com/u/Michael_Kirschner2)\
**Post date:** [July 28, 2022, 6:07pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/10 "2022-07-28T18:07:30Z")

</div>

~~hmm - I think that this value gets set directly by deserialization code in newtonsoft.json - I guess it could be a localization issue.~~  
actually it goes through here:

> <https://github.com/DynamoDS/Dynamo/blob/master/src/Libraries/CoreNodeModels/Input/BaseTypes.cs#L452>

---

<div class="post-metadata">

**Author:** ![kovacsv](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kovacsv](https://forum.dynamobim.com/u/kovacsv)\
**Post date:** [July 29, 2022, 9:22am UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/11 "2022-07-29T09:22:20Z")

</div>

We could recreate the issue on other machines, so despite it uses InvariantCulture could it be a localization or system setting issue? We are using this one:  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/3/835085db82cae72a2f0269f59c903dd986075f62.png)

---

<div class="post-metadata">

**Author:** ![Anton\_Huizinga](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/anton_huizinga/32/155377_2.png) [@Anton\_Huizinga](https://forum.dynamobim.com/u/Anton_Huizinga)\
**Post date:** [July 29, 2022, 10:19am UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/12 "2022-07-29T10:19:00Z")

</div>

What if you explicitly use a double in a CodeBlock?

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/f/2f847eee384243d60cca06616cd39c4837627fa7.png)

What is the value after reopening?

---

<div class="post-metadata">

**Author:** ![kovacsv](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kovacsv](https://forum.dynamobim.com/u/kovacsv)\
**Post date:** [July 29, 2022, 2:38pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/13 "2022-07-29T14:38:58Z")

</div>

It doesn’t change if it’s in CodeBlock.

---

<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:** [July 29, 2022, 5:06pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/14 "2022-07-29T17:06:30Z")

</div>

Does it reproduce if you open by navigating to the path instead of using the recent files shortcut?

What if you close Dynamo in between runs?

---

<div class="post-metadata">

**Author:** ![kovacsv](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kovacsv](https://forum.dynamobim.com/u/kovacsv)\
**Post date:** [September 28, 2023, 12:33pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/15 "2023-09-28T12:33:57Z")

</div>

Sorry @jacob.small somehow I failed answering this.  
None of your suggestions work. And the issue is still present in the latest D4C3D release.  
As I see it appeared for other users as well.  
For me the problem is present only at 1 and 2 decimal places (trailing zeros don’t count). At 3 (node does not allow more) it works as should.

> [@Number node issue](https://forum.dynamobim.com/t/number-node-issue/51957/6):
>
> Here is my version :[image]

---

<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:** [September 28, 2023, 12:39pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/16 "2023-09-28T12:39:22Z")

</div>

Please submit a ticket to Autodesk support via the accounts portal at [manage.autodesk.com](http://manage.autodesk.com). Include a link to a recording reproducing the issue in 2024.1 and a .dyn file with an offending node in it.

---

<div class="post-metadata">

**Author:** ![kovacsv](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kovacsv](https://forum.dynamobim.com/u/kovacsv)\
**Post date:** [September 28, 2023, 12:50pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/17 "2023-09-28T12:50:23Z")

</div>

Thanks. Does the Futures Portal work as well? I’m not used to tickets.

---

<div class="post-metadata">

**Author:** ![zachri.jensen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/zachri.jensen/32/205331_2.png) [@zachri.jensen](https://forum.dynamobim.com/u/zachri.jensen)\
**Post date:** [September 28, 2023, 1:20pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/18 "2023-09-28T13:20:31Z")

</div>

Do you get the same issue when using Dynamo Sandbox, or only Dynamo for Civil 3D?

---

<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:** [September 28, 2023, 1:40pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/19 "2023-09-28T13:40:33Z")

</div>

Sadly not; current product issues need to be submitted via the accounts portal or they never get picked up.

---

<div class="post-metadata">

**Author:** ![kovacsv](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kovacsv](https://forum.dynamobim.com/u/kovacsv)\
**Post date:** [September 28, 2023, 2:22pm UTC](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224/20 "2023-09-28T14:22:52Z")

</div>

I cannot reproduce the issue in Sandbox, only in D4C3D

[Next page](https://forum.dynamobim.com/t/number-input-node-switching-back-to-integer-when-reopening-script/79224.md?page=2)
