Set Parameter By Name doesn't work properly!

Hi everyone,

I’m trying to transfer room number parameter to elements standing in it.

As you can see in the image above, te node Element.SetParameterByName doesn’t work properly. Elements are grouped by corresponding room, so every sublist of value to set (Room Number) has the same value.
For example, in list 3 there are 8 equal room numbers (A-R07).
However, when i get elements parameter values, in list 3, the fourth item has a wrong value (A-L03) and it’s not an isolated case.

Someone knows how can it be possible?

Thanks everyone


Component room.dyn (32.6 KB)

Is it possible that the element is in both rooms? Maybe it was written as one room first but then in the next list, it was rewritten as a second room.

In your example, it was a wall, which is very possible to be in two rooms at the same time.

1 Like

Tecnically it’s possible, but very unlikely, because my walls are all finishes. So in every room there are different wall items, corrensponding to different wall finishes.

Anyway the problem is that Room numbers value are setted by me. Items (eg A-R07) in every sublist are necessarly the same, precisely because i made lists like that. So i don’t know why “SetParameterValueByName” changes it.

Can you supply a Revit project as minimal as possible that reproduces the problem?