Using expressions with variables

It is possible to add expressions involving variables to your templates. For example:

${tool.diameter/2}
${(3.5 + feedrate.cutting)*2}
${2*stepover}

You cannot use string variables such as ${project.partname}, $notes, $totaltime, with the exception of the $CutTime variable, which can be multiplied:

$CutTime*2

Whether your expression is evaluated correctly depends on the template type it's inserted into. For instance, an expression with the {tolerance} variable is only resolved if it's in a toolpath template type or in a summary template type between the <summaryrow> </summaryrow> tags.

Tip: You can try formatting variables. For example to change the number of digits that are displayed for spindle speed, you could enter: ${int(spindle)}. It is also possible to round values to a certain number of decimal places. For instance, to round the maximum x limit of the block to two decimal places: ${round(block.limits.x.max, 2)}. Rounding more than one variable is not recommended.