Node Element.SetParameterByName not working properly (?)

Hello, community.
Can someone explain why the node Element.SetParameterByName works properly on “Case 2” and not on “Case 1”? I mean, on “Case 1” the parameter is not being set at the sequence.

If that matters, the elements are being collected from a schedule.

1 Like

I would think it should work as expected. I’d first try freezing CASE 2, then try getting the elements in a more old-fashioned way – not from a Schedule.

1 Like

I’ve add both cases just to show how the node isn’t working as expected.

I’ve tried your suggestion and unfortunately it has no effect. If I create manually a list of “1, 2, 3, …, X” and apply that, it works, but it doesn’t if I apply the sequence produced by List.Count. I have also tried both Text and Number types of parameter.

Even if you get the elements with All Elements of Category instead of via a Schedule?

Yes, even so. Apparently the problem is the node.

Maybe try a Sort By Key in there, somewhere???

It looks like those are family instances, but can you confirm that? It could be that you have multiple of the same types in your list so you’re rewriting values down the list. Or that you just have multiple of the same instance.

2 Likes

They are already in the order that I need, actually. So…

Yes and multiple families have the same family instance name. I have ordered them (alphabetically) by a parameter. What can I do?

How about handling them via IDs (which will be unique), with Sort By Keys?

1 Like

I have found the problem. @Nick_Boyts was right: some instances were duplicated.

Thank you to both.