Can Dynamo align framing members to a sloped reference plane?

I placed hundreds of beams on a level for a non-rectangular roof, with all the sizes, camber and headed stud quantity set for each beam. Then the architect decided they wanted to slope the roof. Is there a way for dynamo to be able to change the beams from being flat, aligned to the level, to being sloped, aligned to the sloped reference plane?