Hi @reeltime273 ,
To add Stock Size, you can add the codes in your post as shown below. For clarity, I have added original and modified codes below:
Original:
writeComment(localize("POST GENERATED ON") + " " + now.toLocaleDateString() + " " + now.toLocaleTimeString()); // ADDED 04.09.2024 BY MB
writeln(" ");
writeComment(programComment);
writeProgramHeader();
Modified:
writeComment(localize("POST GENERATED ON") + " " + now.toLocaleDateString() + " " + now.toLocaleTimeString()); // ADDED 04.09.2024 BY MB
var workpiece = getWorkpiece();
var delta = Vector.diff(workpiece.upper, workpiece.lower);
writeComment(" Stock dimension X = " + xyzFormat.format(delta.x) + " ");
writeComment(" Stock dimension Y = " + xyzFormat.format(delta.y) + " ");
writeComment(" Stock dimension Z = " + xyzFormat.format(delta.z) + " ");
writeln(" ");
writeComment(programComment);
writeProgramHeader();
To add notes, you can add the codes in your post as shown below.
Original:
properties.writeTools = {
title : "Write tool list",
description: "Output a tool list in the header of the program.",
group : "formats",
type : "boolean",
value : true,
scope : "post"
};
function writeProgramHeader() {
// dump machine configuration
var vendor = machineConfiguration.getVendor();
Modified:
properties.writeTools = {
title: "Write tool list",
description: "Output a tool list in the header of the program.",
group: "formats",
type: "boolean",
value: true,
scope: "post"
};
function writeProgramHeader() {
if (hasGlobalParameter("job-notes")) {
var notes = getGlobalParameter("job-notes");
if (notes) {
writeBlock("( -----SETUP NOTES----- )")
var lines = String(notes).split("\n");
var r1 = new RegExp("^[\\s]+", "g");
var r2 = new RegExp("[\\s]+$", "g");
for (line in lines) {
var comment = lines[line].replace(r1, "").replace(r2, "");
if (comment) {
writeComment(comment);
}
}
writeBlock("( --------------------- )")
}
}
// dump machine configuration
var vendor = machineConfiguration.getVendor();
The final output will look like the screenshot below. I hope this helps.

Aju Augustine
Technology Consultant