@hestingjj @Tiago.Caldeira I put this together real quick for you to try, let me know how it works. It assumes that the pipe start/end points are at least within the bounding box of a structure. If they are outside of that, then a different approach would be needed.
ConnectPipesToStructures.dyn (64.0 KB)