Code Block warning


#1

Hi Dynamo community,

I am very fresh in Dynamo and have a question for you.
I used to work on previous version of Dynamo with this script and it was working fine. Unfortunately, after Dynamo update to version 2.0.1 Code Block gives me a Warning: list indices must be numeric, which was not a case before and now it does’t create a required list anymore. a,b & c indices are numeric values which need to create a new list based on the elements list.
What do I need to change so it works again?


#2

Hi :slight_smile:

In Dynamo 2.0, all the indices of a list must be of int type.
I think you could use the Dictionary structure to your benefit :

http://primer.dynamobim.org/en/09_Dictionaries/9_Dictionaries-In-Dynamo.html


#3

this can help also
http://dynamobim.org/to-dynamo-2-0-and-beyond/


#4

Thank you guys