Hello,
I’m new to this forum an I need your help:
I wrote a script (in Revit 2019 / Dynamo 1.x) to import several paramters from a excel-sheet to the MEP-Spaces. It worked fine so far until I change to Revit 2021 with a newer version of Dynamo (2.3).
Now I get the following error in the “Code Block”:
List indices must be numeric
*This error message indicates that you are trying to access an element in a list by using an index value that is not an integer (i.e., a whole number). *
*Starting with Dynamo 2.0, lists are collections of values where each value in the list can be accessed using only integer index values (index values range from 0 to list size minus 1). *
*Read more about differences between Dynamo 1.X and Dynamo 2.X (including how accessing elements in a list has changed) here. *
How to fix
Make sure the index value you use to access list elements is strictly an integer (e.g., 2 and not “2” or 2.0).
My script looks like that:
The numbers (e.g. 04.01.01…) are the room numbers and I want to find the matching room numbers of my excel-sheet and my MEP-Spaces.
Corresponding to the error message there was an change between the version 1.x and 2.x. Does anyone have a workaround for this issue? Is there a way to use the Code-Block with non-integers?
Best regard and many thanks in advance
Chris