How can I export polyline vertices into a text file, CSV or Excel?
Export polyline vertices
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Export polyline vertices
From a QCAD user:
Re: Export polyline vertices
You can select the polyline(s) in question and use
Misc > Script Examples > Import / Export > Output Polyline Vertices
to output the vertices into the command line history as comma-separated values. This can then be copied / pasted into a CSV file for example.
This script could also be used as a starting point for a more sophisticated CSV export script:
https://github.com/qcad/qcad/blob/maste ... olyline.js
There's also a command line tool called dwg2csv which comes with every installation of QCAD Professional. This can be used to export polyline vertices to CSV as follows:
This produces a file polylines.csv with contents such as:
Misc > Script Examples > Import / Export > Output Polyline Vertices
to output the vertices into the command line history as comma-separated values. This can then be copied / pasted into a CSV file for example.
This script could also be used as a starting point for a more sophisticated CSV export script:
https://github.com/qcad/qcad/blob/maste ... olyline.js
There's also a command line tool called dwg2csv which comes with every installation of QCAD Professional. This can be used to export polyline vertices to CSV as follows:
Code: Select all
dwg2csv -f -t Polyline -p Type -p Vertex:X -p Vertex:Y pls.dxf
Code: Select all
Type,Vertex:X,Vertex:Y
Polyline,,
Vertex,35,51
Vertex,47,65
Vertex,72,52
Vertex,69,36
Vertex,54,32
Polyline,,
Vertex,100.40549040452,42.175288556134
Vertex,106.5809484683,31.437620262786
Vertex,94.964349723221,26.002330941694
Vertex,92.299992212882,33.35595767023