Changing Modeling Method with Dynamo

Hello all,
This is my first post here in this forum. Thank you all for sharing your knowledge and helping people with your expertise.

In my current model, the slab/floors are cutting the beams. Kindly see the image which I uploaded.

Question:
Is it possible to change from “Current Situation” to “Desired Situation” for all the beams and slabs in the entire project at one go, using Dynamo.

Revit command to be used: “Join Geometry” and “Switch Join Order”