Custom Node Input list default value not working

I have a custom node that needs to take in a list of doubles and nothing else. In Dynamo 1.3.3, the line measurement : double[]..[] = {2.19416} in an input node acted as expected: Limited input to a list of doubles, and if no input is provided, default to a list with the single value of 2.19416. In Dynamo 2.0.3, I can’t get the full line to work correctly, and instead displays the entirety of the line in the variable spot in the node (see image). It’s as though assigning a default to a list is not a possible function. I can change the Input Node value to measurement : double[]..[] or measurement : double = 2.19416, but nothing else. Is there something I’m missing, or is a default for a list no longer supported?
Annotation 2019-12-12 133316

Hello @pmacknight,

In the switch from Dynamo 1.X to Dynamo 2.X lists were changed to be represented by square braces [ ] instead of curley braces { } which now demarcate Dictionaries :slight_smile: This was done to decouple the old functionality, where both Dictionaries and Lists were one and the same into the new where you can now more strategically flow your data.

So please try putting in square braces! As a side note, you can also no longer have any spaces inside your input/output ports.

1 Like

@solamour Thank you very much! That fixed the issue I was having. I couldn’t find any info by searching my issue, and I had difficulty finding any mention of it in the patch notes I found, but this move makes a lot more sense.

As for your side note, I didn’t notice any issue with having spaces inside the input/output ports, but I’m currently running v2.0.3. If that’s a change that was made later on, I’ll just have to keep this in mind and make the change once I’m finally able to update to a newer version (too attached to the readability of how it currently is to fix it if it’s not an issue). Thanks for the heads up, though; now I won’t scratch my head too long when that’s an issue.

1 Like