@macr72515SL4L, Find the writeToolBlock() function which should look like this:
function writeToolBlock() {
var show = getProperty("showSequenceNumbers");
setProperty("showSequenceNumbers", (show == "true" || show == "toolChange") ? "true" : "false");
writeBlock(arguments);
setProperty("showSequenceNumbers", show);
}
And replace it with the following code:
function writeToolBlock() {
var num;
if (getProperty("showSequenceNumbers") == "toolChange") {
if (toolSequenceNumbers[tool.number] != undefined) {
toolSequenceNumbers[tool.number]++;
} else {
toolSequenceNumbers[tool.number] = 1;
}
num = "N" + ((tool.number * 100) + toolSequenceNumbers[tool.number])
}
writeBlock(num, arguments);
}
And don't forget to declare the variable somewhere towards the beginning of your post:
var toolSequenceNumbers = {};
If the Show Sequence Numbers property is set to "Only on tool change" then it will output the special N numbers, otherwise it will post normally.
I hope this works for you!