I've seen similar questions but none answer mine.

I have DWG files of floorplans. When I import them to Illustrator, they are all lines. I can make all the walls black with the live paint tool in one click easily. The problem is, the entire outline is the wall, the windows are drawn as a group of a rectangle with 2 lines in it. The good thing is, the DWG file is layered - I can simply select all objects on the window layer then change the stroke and fill to white so the windows show up as a white gap:

Window in a floor plan

Note that the white rectangle representing the window doesn't have black lines in them. They should look like this: correct window

The problem is, the 2 lines are arranged below the rectangle by default. At the moment, I have to select every single rectangle and manually right click --> arrange --> send to back (or select every single line, 2 for each window, and bring to front). I had no luck using select --> same --> (any option) because everything on the window layer was by default, the same stroke and fill, even though one is a rectangle (with black 0.7pt thickness and no fill when I imported the DWG, and then I can change all of them in one go using select all on layer in the layers panel and clicking on the circle) and the others are 2 lines (also black 0.7pt thickness and no fill when I imported the DWG).

How can I select all the lines inside and beneath the rectangles in one go so I can bring them to the front? If I had a hundred windows, I don't want to have to change every single window individually.

  • There is no canned way of doing this
    – joojaa
    Sep 6, 2020 at 8:11
  • So the rectangle isn't filled? How is it "covering" the paths then? Do the open paths under the rectangle have a fill applied to them as well? I know you posted that you tried.. but selecting all the rectangles via Select > Same > Fill & Stroke should pick up white filled, black stroked rectangles and not simply black stroked paths, even if it's the same stroke weight and color. Then simply move the rectangles backwards.
    – Scott
    Sep 6, 2020 at 19:30
  • @Scott i suspect that wont work. Its a cad file. Cad users dont generally recognize fills. They draw with stroke priority. So since there was originally no fill OP most likely by descrition filled all objects in the layer. So there is now no thing to differentiate the paths from each other. You could script the action ofcourse. Or you could invert the layer order assuming the cad apo was conequent.
    – joojaa
    Sep 6, 2020 at 20:31
  • That's why I asked @joojaa ....That white filled rectangle is either unique or... open paths have a white fill applied (which is a bad idea).
    – Scott
    Sep 6, 2020 at 20:34
  • @Scott yeah, but it reads a bit more self evident to me since i deal with cad file translation every day. For example its evident that widows likely would be their own layer because thats how object identification in general CAD works. Also fills are almost unheard of.
    – joojaa
    Sep 6, 2020 at 20:47

1 Answer 1


If, in fact, the windows are made up of a rectangle and two lines (which is suspect)- then it seems that you can group select the rectangles using the select same "shape". This seems to not be the case based on the comments and the fact that selecting "same" anything is not working for you.

This leads me to believe that indeed the window rectangles are actually made up of separate open paths. This is also my experience that .dwg files come into Illustrator as a whole lot of open paths with little to no organization. To the point that the letter E is made up of 3 different paths. I actually prefer to work on a .pdf version and forego the .dwg in Illustrator.

I assume that you can not dig into the layer that contains the windows and identify the 2 inner lines from the lines that make up the "rectangle" ?

I suggest making a new layer and create new windows made of an actual rectangle and 2 lines. These can be grouped and copied and rotated and resized as needed to overlay all the .dwg drawn windows. To facilitate this you may need to select the entire .dwg window layer and change the stroke to magenta or something so locating their position is easy.

Alternately, you could re-draw these windows on their own top most layer prior to doing the live paint blackout of the walls.

Without knowing how your desired end result is to be used, it is never a good idea to have filled open paths in Illustrator. I tend to use the .dwg files more as a template to re-draw in Illustrator. And every time I have to work on a .dwg file in Illustrator I tell myself that I really should purchase and learn CAD.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.