Overwrite Floor Finish for multiple rooms


I am totally new to revit (10 hours experience) so i am sorry in advance for my lack of skills.

I am trying to make a script, that overrides multiple floor finish parameter values with the same value. I know it can be done very easily with a schedule, and i only do it for the learning proces. It is work related though.

This is what i did. It only seems to overwrite one of the existing room parameter values. Why?

I think it is because you connected Element.SetParameterByName to Element.SetParameterByName instead of Get Rooms By Level. Only the first Element.SetParameterByName is connected that way, thats the one thats working.

Hey Jaap. Thanks for the reply. Great input, but now i tried wiring them all to the Get Rooms by Level node. It doesn´t seem to do the trick. It’s still only the first existing value, that gets the overwrite.

That could mean two things:
1: The parameter Floor Finish is not defined
2. The values in the Code Bock are not active in Revit file (EXISTING VALUE1, etc)

Maybe it’s also easier to use the following nodes as selecting rooms: Catogies --> All Elements Of Category --> Element.GetParameterByName --> and so on. Depends on the goal.