List.GetItemAtIndex 2.0 / 2.2 different behavior

The node ListGetItemAtIndex is behaving differently in 2.0 and 2.2. Anyone know why?

2.2

2.0

I’ve done test with code block and I’m getting confusing outcomes.

The top code block uses the parameters and a single index (0) and it works fine. Gets the parameter and it’s settings.

The middle one uses the parameters and the “parameters needed” list generated by the script. This is not working correctly. It is returning the 0 index character in the nested list 0 and then the 1 index character in nested list 1 and so on.

The bottom code block uses the parameters and a manually generated list (first 4 from the script generated one) and it works correctly.

I’m at a loss.

@solamour @Michael_Kirschner2 any ideas?

can you share a sample .dyn or even just show what the full structure of your input data and indexing data is. A bit hard to see as it is in the last image.

2.2 does enable string indexing which was accidentally broken in the past.

Mechanical Shared Parameters.dyn (178.3 KB)

Here’s the script. I’ve had to alter it temporarily so that I could add parameters to families for a project.

Hi @crapai - we can’t really reproduce this with your .dyn because we don’t have the revit file, or the excel files…

One thing that might be the issue is to try converting the indices to ints, it’s not clear if they are really strings or not - I don’t know where the excel custom nodes you are using are from or if they internally convert from strings from excel to numbers when they import them.

The best way to get to the bottom of this is to make the smallest .dyn you can that reproduces this issue, without requiring revit or external files. I’m thinking the excel nodes might be the cause because your hand built list of indices works fine.

1 Like

I wasn’t able to strip enough out but I did create a separate version and was able to create a lot of different combinations of code blocks and script generated list and was able to narrow it down to a node that needed tointeger added after it. This is what I added:

@crapai does this mean that it works as expected after converting the list items to integers or are there still issues?

It’s working again.

2 Likes