Input a dictionary from dynamo (DesignScript.Builtin.Dictionary) to a custom ZeroTouch node

Hi Everyone,

I am trying to feed a dictionary that comes out of a python node (type: DesignScript.Builtin.Dictionary) into a zerotouch node that I am developing in C#.

How can I cast or convert this input to a normal C# dictionary that I can then use in my code?

I think you’d need to get the key/value pairs from the DesignScript dictionary and put them in a new Dictionary<string, object> in your ZT node.

1 Like

Thank you for the reply.
But how do I access the pair in my code?
Using dictionary type as the input type does not work.

you can just reference the Dynamo dictionary type, it’s in the designscriptbuiltin.dll which is part of the dynamocore nuget package.


it also looks like IDictionary should be converted automatically, or Dictionary for that matter so a code repro case would be useful.

1 Like

I was able to use System.Collections.IDictionary and it worked fine.
Thank you!

1 Like