Hello Dynos,
Does anybody use “tuple”, for a script ?, I try just by couriousity to create some scripts!
In a codeblock i cant create one.
What is a practical example of a tuple in Revit?
Is there in designsscript a Workaround?Tuple_Example.dyn (4.7 KB)
https://www.w3schools.com/python/python_tuples.asp
KR
Andreas
You can use tuples in a python node, but if they are part of your output, Dynamo will automatically cast them to a list since that is the most similar data type to a python tuple. I have used tuples before (in a python node) as keys within a dictionary. Tuples are also more memory-efficient than lists in python, however tuples are not part of Designscript. Since tuples are cast to a different data type upon being output, it is difficult to pass them between nodes (unless you wrap them within a custom class which Dynamo cannot convert).
6 Likes