Export polyline vertices

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Export polyline vertices

Post by andrew » Thu Apr 22, 2021 7:58 pm

From a QCAD user:
How can I export polyline vertices into a text file, CSV or Excel?

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Export polyline vertices

Post by andrew » Thu Apr 22, 2021 8:06 pm

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:

Code: Select all

dwg2csv -f -t Polyline -p Type -p Vertex:X -p Vertex:Y pls.dxf
This produces a file polylines.csv with contents such as:

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

Post Reply

Return to “QCAD 'How Do I' Questions”