List tools in post

Discussions around the CAM Add-On of QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Indicate the post processor used.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
n_spect_r
Active Member
Posts: 46
Joined: Tue Jun 18, 2019 12:09 pm

List tools in post

Post by n_spect_r » Wed Jan 14, 2026 2:24 pm

I did some searching but did not find what I am looking for.
I'd like to post a list of all the tools in the header. Currently I am using this header, it would be nice to have a list of tools right below it.
Probably been done, I just have not found it.

Thanks.
Win 11, custom post for Mazak, Qcad ver 3.28

this.header = [
"(File: [FILENAME] -- [DATETIME])",
"(Block-name: Header)",
"(Block-expand: 1)",
"(Block-enable: 1)",

];

CVH
Premier Member
Posts: 5082
Joined: Wed Sep 27, 2017 4:17 pm

Re: List tools in post

Post by CVH » Wed Jan 14, 2026 3:11 pm

Yes, that would be possible in a custom post-processor.
Never alter or replace those that are included in a standard installation.
On a next update these might be overwritten by a new standard one.
A custom post-processor is not overwritten and not deleted unless you delete the complete QCADCAM folder and sub-folders yourself.

There exist a few post-processors that have this build in.
E.g. ...\QCADCAM\postprocessors\LinuxCNC.js

You have to include the complete LinuxCNC.prototype.writeHeader function in your custom post-processor.
Replace 'LinuxCNC' with your class name.
In essence you overwrite the standard implementation of this function.

This doesn't alter the export of the standard header stored in this.header
Handled by this.writeBlock("header");
The standard header will thus be exported first.

I see that your header are 4 lines of info
In the first line you use variable "FILENAME" and "DATETIME"
The rest is purely textual to us.
Your header does not contain common instructions like 'G21 G17 G90' for example.
It doesn't go up to a safe position and doesn't start the spindle.

Regards,
CVH
Last edited by CVH on Thu Jan 15, 2026 6:49 am, edited 1 time in total.

n_spect_r
Active Member
Posts: 46
Joined: Tue Jun 18, 2019 12:09 pm

Re: List tools in post

Post by n_spect_r » Wed Jan 14, 2026 4:36 pm

Attached is the custom post. The two lines, block expand and enable, are because I use bCNC to preview paths and this expands all blocks in that program.

Thanks for the reply, I will look in to it shortly.
Attachments
Mazak.js
(3.04 KiB) Downloaded 2 times

Post Reply

Return to “QCAD/CAM”