Automated Gaps for windows and doors in masonry wall

Hi everyone, I am trying to generate an automatic gap on a wall of blocks (each block needs to be a family element) along with its repagination. As in the attached image, simple like that, with a single wall insulated in the same way.
How can I do this in Dynamo by interacting with revit?
I’m trying to create surfaces and use the DoesIntersect node but I’m not getting how to interact with the initial block wall.