To create a roof through exterior walls, you need to use the outline of the exterior walls or roof, and then place the roof according to the family type already in the document.
This method may not be very time-saving, but for Dynamo, this path is feasible.