Possible to add custom command line commands?

Hello! I’m very happy that I found Qcad!

A little background: I own a laser fab shop and we received a customer file that is 30ftx30ft and contains nearly 250,000 holes (Yikes!). I usually use solidworks, but it absolutely refuses to touch that many holes. Qcad doesn’t have an issue with it so you guys must be doing something right!

I have to split this pattern of holes into smaller sheets that I can actually fit on my laser. I used an excel spreadsheet to calculate output coordinates for the plate starting at a specific location, it then highlights everything inside that square, inverts the selection, then deletes everything. This leaves me with just my desired sheet size and the the customers pattern inside. Then I tell it to draw mounting holes in specific locations around the plate so they can bolt together once bent.

The issue I’m finding is it seems to be skipping or “forgetting” certain steps when I paste the string in the command line.

For example if I draw the rectangle, invert the selection, then delete by pasting the following:

TR
144,351
228,385
TI
DELETE


This should delete everything outside that rectangle, but when the command finishes it doesn’t delete it. It is selected and I can type delete, but it seems to forget or skip that “DELETE” was previously input. I imagine it has to do with the large number of entities and that it just needs to wait until the previous command is finished before it starts the next one.

I can’t upload the original file here, but I can share it via email if needed.

The ideal step for me would be to output all calculated the commands from excel then just paste the whole thing and have Qcad run it all at once. As it is now it seems I have to copy and paste multiple commands. This would be tiresome to do 4-5 times each for 40+ sheets.

What I find is that TR stays active, it allows TI but does not delete.

From notepad text I found a working method.

TR
0;0
100;100
TI
QQ
ER

QQ = reset ER = delete

Remember that text from Excel might have a win style EOL.
And that works fine for all but the last entry.

Regards,
CVH

Your working method isn’t working on Win10. :wink:

Delete will be ignored or otherwise interpreted!

used for a test in the command line (lh is only used to see clear what happens …):
tr
144;351
228;385
ti
qq
ER
lh

QCAD will only use:
Command: tr
Coordinate: 144;351
Coordinate: 228;385
Command: ti
Command: qq
Command: lh
(QCAD ignored ER)

same test with:
tr
144;351
228;385
ti
qq
delete
lh

QCAD used:
Command: tr
Coordinate: 144;351
Coordinate: 228;385
Command: ti
Command: qq
Command: lh
Command: lh
(QCAD replaced delete with lh)

another test:
tr
144;351
228;385
ti
qq
er
lh

QCAD changed it to:
Command: tr
Coordinate: 144;351
Coordinate: 228;385
Command: ti
Command: qq
Command: lh
(QCAD ignored er)

If I use the script twice it will work because the second time everything is accepted:
Command: tr
Coordinate: 144;351
Coordinate: 228;385
Command: ti
Command: qq
Command: lh
Command: tr
Coordinate: 144;351
Coordinate: 228;385
Command: ti
Command: qq
Command: lh
Command: tr
Coordinate: 144;351
Coordinate: 228;385
Command: ti
Command: qq
Command: er
Command: lh

With other words - something isn’t working as expected …

Indeed correct, it was the re-entry that did the trick.

The doubling of your last command is related to the Winstyle EOL and if you copy the ‘newline’ or not.

Tried ‘cut’ instead … not working either

CVH

The multi-line paste was designed to paste multiple coordinates for a single tool.

Your mileage may indeed vary when trying to launch / terminate multiple tools using this method (surprised you got that far e_surprised)