How to use Dynamo to align a beam system with a sloped roof?

I am working on a Dynamo script that would take an existing framing system and align the top of steel with the bottom of a sloped roof. I hope to create it in such a way that the beams will automatically follow if the architect changes the slope of the roof.

I created a Reference Plane that is aligned with the bottom of the sloped roof slab. I then attempted to assigned the “Work Plane” parameter of the beams to that Reference Plane. Though my script recognizes the parameter and the name of the specific Reference Plane, it does not seem to be working. I attached a picture of what I made.

Starting at the end and working backwards: I used the Parameter.SetValue node. I hooked a Parameter.ParameterByName node into the parameter button. I selected the beams and hooked those into the element button. I used a Code Block “Work Plane” and hooked that into the name button. It identifies that parameter as a list
Work Plane: Level : Level 1
Work Plane: Level : Level 2
Work Plane: Level : Level 3

For the value of the Parameter.SetValue I hooked in an Element.GetParameterValueByName node. I selected the reference plane and hooked that into the element button. I used Code Block “Name” and hooked that into the parameterName. It successfully identified the Reference Plane name as “ROOF”.

Do you have any idea where I went wrong or if there is an easier way to achieve my goals?