Get windows and door coordination

Hi, I’m following this same process. How do you get the closed polycurves at the doors ? Nothing is working for me. Polycurve.ByPoints gives me an error. Surface.ByPerimeterPoints gives me an error. I can’t get these curves to close. Any thoughts ?
Thanks,
JF