I made a similar algorithm with Rhino inside Revit, even inserting other elements such as furniture... the only detail is that it is required beforehand to prepare the dwg so that the conversion is efficient... if you work under certain protocols in CAD it is very efficient, even modifying the dwg the change is automatic in Revit.
Great question. There aren't two walls in AutoCAD, rather two lines that represent the thickness of one wall. The tool recognizes those two lines, and draws one wall down the center.