0

i have problem with ezdxf. i want put polyline coords to list. i can do it when i had simple polyline in the dxf. i want separate the polylines coords to multiple list.

simple polyline to coordslist:

import ezdxf

#input file

dwg = ezdxf.readfile(test.dxf)

modelspace = dwg.modelspace()

#polylines from dxf file into
linelist = []
for name, line in enumerate(modelspace.query('LWPOLYLINE'), start=1):
    with line.points() as points:
        for name, coords in enumerate(points):
            linelist.append([str(name), int(coords[0]), int(coords[1])])




  • Please show an example of the input and output for the simple polyline that you say is working, and show the code you tried for the non-simple polyline, and explain why it's not working (what input do you get for the latter one, and what output do you get, and how does it differ from what you expect?) – saxbophone Sep 29 '22 at 11:46

0 Answers0