I have a poly line that consists of about 30 sets of points. I see how to enter them one at a time to draw my line, but is there any way to enter all 30 at the same time? Something link 1,0;2,5;3,5 etc. So I would enter the start point, then some form of separator, the second point, a separator third etc.
I know it can be done in a script using an ascii text file, but for my purposes simply entering them on the command line is quicker and easire right now.
Thanks.
[solved] polyline multiple points from command line
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.
Re: polyline multiple points from command line
Correction, not a polyline, but the spline tool. Sorry about that.
Re: polyline multiple points from command line
First, get the coordinates into the following format (for example through a CSV export from a spreadsheet or in a simple plain text file):
x1,y1
x2,y2
x3,y3
...
For example:
0,0
40.5,25.3
50,75
...
Copy the whole list of these coordinates to the clipboard (select the multiple lines from the plain text or CSV file and copy to clipboard in a text editor).
Then, start the tool for which you want to use the coordinates. This can be any tool that expects one or multiple coordinates such as the polyline tool, spline tool, point tool, circle with radius tool, etc.
Click into the command line input field or press the spacebar to make sure the command line has the keyboard focus.
Paste the list of coordinates into the command line input field using Ctrl-V (or Cmd-V on macOS).
QCAD now enters the list of coordinates just as if you would have entered them one by one manually.
If the above example does not work, please check your configured coordinate format under Edit > Application Preferences > General > Coordinate Format.
x1,y1
x2,y2
x3,y3
...
For example:
0,0
40.5,25.3
50,75
...
Copy the whole list of these coordinates to the clipboard (select the multiple lines from the plain text or CSV file and copy to clipboard in a text editor).
Then, start the tool for which you want to use the coordinates. This can be any tool that expects one or multiple coordinates such as the polyline tool, spline tool, point tool, circle with radius tool, etc.
Click into the command line input field or press the spacebar to make sure the command line has the keyboard focus.
Paste the list of coordinates into the command line input field using Ctrl-V (or Cmd-V on macOS).
QCAD now enters the list of coordinates just as if you would have entered them one by one manually.
If the above example does not work, please check your configured coordinate format under Edit > Application Preferences > General > Coordinate Format.
Re: polyline multiple points from command line
Andrew,
Thank you. I tried your directions with a spline. When I select spline and "fit points" the command line shows "First Control Point:". When I past the coordinates into the command line, it only accepts the first set. The others show up in the command line history as "coordinates" but the command line shows "Next Control Point:". So it seems to know that I am entering coordinates, but the spline tool doesn't seem to want to accept more than one point at a time.
Thank you. I tried your directions with a spline. When I select spline and "fit points" the command line shows "First Control Point:". When I past the coordinates into the command line, it only accepts the first set. The others show up in the command line history as "coordinates" but the command line shows "Next Control Point:". So it seems to know that I am entering coordinates, but the spline tool doesn't seem to want to accept more than one point at a time.
Re: polyline multiple points from command line
Please indicate operating system and QCAD version, thanks.
Re: polyline multiple points from command line
Sorry about that. I am using QCAD 3.17.3 running on a Fedora 25 (Linux) platform.
Re: polyline multiple points from command line
This actually sounds like it worked just fine. Can you please double-check? It's correct that after pasting, the tool remains active (for you to enter, paste or click more coordinates). But if you then right-click to terminate the tool, the spline should be created with the points you have pasted.ov10fac wrote:The others show up in the command line history as "coordinates" but the command line shows "Next Control Point:".
Re: polyline multiple points from command line
Yep, you are correct and my bad. I had the degree set to 8 but only entered 4 points. Once I set the degree correctly, everything works like a charm. Many thanks! This will save me a lot of time. I use it to "loft" canoes I am building and the spline makes a great lofting tool.
John
John