@maryamr said:
thnx for your answer.
there is a cases where a model can contain 2 windows linked to a door like the model below, but it doesn't appear using your code
Seems rather odd to have windows connected to a door but then I'm no architect. It finds the door but it also thinks the door is a wall and the wall is a door because it has an edge that fits the door criteria, vertical and shorter than the adjoining face.
ps. Files posted should be version 8 so that, the unfortunate ones like myself who don't have the latest Sketchup version, can view the model.