@manhgt214 thank you very much. This worked.
Do you also know possibly about the other case where if I change the points from which some internal wall is drawn and then move those points and run the script again, there are errors and the walls aren’t drawn new? I asked about this here Creating/Changing simple house layout works but with errors