@Aartrace1
If your contours and building outline are separate references as you initially stated then why not create a closed polyline with a white fill that is layered (sandwiched) between the contour reference and the building outline reference -- this to mask the contour lines below. If these items are all on the same layer then use the arrange to bring each object (front/back) in the correct sequence. Or you could place each on separate layers to achieve the same with the correct hierarchy. By just masking the contours you won't have to split each line.