hi,everyone!
Recently,I have a problem about Use dictionary in Dynamo Python Script.The point geometry can not be the dictionary’s key.What I should do?
Thanks!
Key Object needs to be hashable.
While points are not, I belive tuples are so you could do:
pt_key = (Pt.X, Pt.Y, Pt.Z)
Dictionary[pt_key] = value
Also as an aside, there’s currently a bug which prevents the Dynamo python node from outputting Python dictionaries, so you’ll need to unpack the dictionary to a list prior to outputting.
1 Like