I have a DWG file in which I have a rectangle with several lines in it (e.g. floor plan with interior walls). How can I use Python to extract the edges (X,Y Coordinates)? I need to extract the floor plan as a graph with nodes and edges defined. So as an instance for one rectangle I should have 4 X,Y coordinates defining the edges of this rectangle as a graph.
Asked
Active
Viewed 4,867 times
4
-
1Did you consider [EWS](http://www.devdept.com/eyeshot/webservice) to do a DWG to XML conversion, then parse the XML to extract XY coordinates? – abenci Apr 21 '17 at 07:41
-
EWS is not free. – USC.Trojan Apr 24 '17 at 04:08
-
You could save the dwg as a dxf, then read the data from the dxf, autocad offers documentation on how dxf can be read and written – Isaac Sekamatte Apr 23 '18 at 12:11