{{ getPluginDescription(plugin.name) }}
{{ schema.description }}
${{ '{' }}ctx.currentTool{{ '}' }} → Current tool number${{ '{' }}ctx.lineNumber{{ '}' }} → Line number${{ '{' }}cmd.type{{ '}' }} → Command typectx.currentTool - Current tool numberctx.currentFeedRate - Current feed ratectx.currentSpindleSpeed - Spindle speedctx.lineNumber - Current line numberctx.currentPosition - {{ '{' }}x, y, z{{ '}' }}ctx.lastPosition - Previous positionctx.isRapidMode - Booleanctx.currentAptFile - Current file infoctx.profile - Machine profilectx.outputSettings - Output settingscmd.type - Command type (GOTO, LOADTL, etc.)cmd.rawLine - Original APT linecmd.position - {{ '{' }}x, y, z{{ '}' }}cmd.toolNumber - Tool numbercmd.diameter - Tool diametercmd.cutterParams - Cutter parameterscmd.spindleSpeed - Spindle speedcmd.feedRate - Feed ratectx.formatNumber(val, decimals?)ctx.formatPosition(pos)ctx.formatComment(text)ctx.calculateDistance(from, to)ctx.getAllAptFiles()ctx.getAllToolNumbers()ctx.getToolInfo(toolNum)ctx.getCommandsByType(type)ctx.findCommand(predicate)ctx.getPlugin(name)ctx.getPluginSettings(name)ctx.setPluginSettings(name, settings)const lines = [];
lines.push(ctx.formatComment('Tool: T' + ctx.currentTool));
lines.push(ctx.formatComment('Feed: ' + ctx.currentFeedRate));
return lines;
const file = ctx.currentAptFile;
const lines = [];
if (file) {{ '{' }}
lines.push(ctx.formatComment('File: ' + file.name));
lines.push(ctx.formatComment('Offset: ' + file.workOffset));
{{ '}' }}
return lines;
const tools = ctx.getAllToolNumbers();
const lines = [];
tools.forEach(t => {{ '{' }}
const info = ctx.getToolInfo(t);
lines.push(ctx.formatComment('T' + t + ': D' + info.diameter));
{{ '}' }});
return lines;