DWG 2D to Revit 3D walls

Hey everyone I am trying to create some walls based on an autocad drawing. The walls will of course be placed on centerlines and the DWG only shows the thickness. Corners of walls are also joined in the DWG.

I managed to create some closing off lines by start a line at the normal direction at the start and end point of each line. However this also means that some end lines go the wrong way. How can I reverse that so I can create good pairs of lines that are the 2D walls and just properly enclose them?

Or am I going at it completely wrong?

(Some unattached nodes are there for deletion etc - I don’t know Python and I am not looking into coding nodes with it. I am new to dynamo as of 2 months)

The trick with this workflow is to isolate all curves longer than a wall end, group them by parallelism and try to pair them/reject one, then make walls by finish exterior/interior. It’s a fairly complex workflow and depends highly on how clean the CAD file is (e.g. are there heaps of overlapping lines, are doors interrupting walls).

The best place to look into potential solutions is this megathread, but I’ve never seen anyone solve this in a way that isn’t limited by how the CAD is set up, or works on any project perfectly:

Ah thank you Gavin. I wasn’t aware of that megathread and now I’ve learned about a couple more nodes :slight_smile:
I didn’t know I could group lines by parallel.

Alright this sort of works, but I also get the problem that most walls (but not all) need to be flipped or that they don’t extend all the way.
At least it saves me a lot of clicks

you can group and find the longest two lines easily:

Sure but it’s more about the orientation of the walls that are then being placed.