Hello,
Does anyone know if OrderedDict, from collections module, could be used in Dynamo?
Desired output: (‘a’, 1), (‘b’, 2), (‘c’, 3)
Example is from: python - OrderedDict Isn’t Ordered? - Stack Overflow
Thank you in advance!
Hello,
Does anyone know if OrderedDict, from collections module, could be used in Dynamo?
Desired output: (‘a’, 1), (‘b’, 2), (‘c’, 3)
Example is from: python - OrderedDict Isn’t Ordered? - Stack Overflow
Thank you in advance!
Hi @cavitcanyilmaz !
In Dynamo a dictionary is not ordered (I think in Python it is not really ordered, it just looks like). But you can get an ordered list based on the dictionary components that way
Hello
OrderedDict works fine inside Python node.
However, for better compatibility with other nodes the dynamo wrapper converts the Python dictionary into Net Dictionary (which is not ordered) Net SortedDictionary is not used
Thank you for the help
I had a feeling something above my level was going on. Thank you for help
Hello
with version 2.04 (Revit 2019 and lower) we need cast python dictionary to Net Dictionary at the OUT variable (Dynamo Wrapper)