@sinan-ba
Go and search for this line if (programComment)
and make something like below
writeln("% " + translateText(String(programName).toUpperCase(), " ", "_") + "_MPF");
if (programComment) {
writeComment(programComment);
}
And search for this below portion do the changes ln red
if (true) { // stock - workpiece
var workpiece = getWorkpiece();
var delta = Vector.diff(workpiece.upper, workpiece.lower);
if (delta.isNonZero()) {
writeln(
"; WORKPIECE" + "(" + ",,," + "\"" + "BOX" + "\"" + "," + "112" + "," + xyzFormat.format(workpiece.upper.z) + "," + xyzFormat.format(workpiece.lower.z) + "," + "80" +
"," + xyzFormat.format(workpiece.upper.x) + "," + xyzFormat.format(workpiece.upper.y) + "," + xyzFormat.format(workpiece.lower.x) + "," + xyzFormat.format(workpiece.lower.y) + ")"
);
}
}
At the end of the code in function onClose()
add the code in red
onImpliedCommand(COMMAND_END);
onImpliedCommand(COMMAND_STOP_SPINDLE);
writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off
if (subprograms.length > 0) {
writeln("");
write(subprograms);
}
writeln("%");
}
Boopathi Sivakumar
Senior Technology Consultant