In software update 5.2.4.9 a new option was introduced that allows to define custom code, that is dependent on the current selected tool.
To start using this feature, navigate to Settings > Machine > Templates > Pre/Post-Operation:

- Press the + button
- Select the tool offset from the combo box
- Type the instruction
- Press the accept button
Example for before tool change operation
in this case tool 11 was selected and the operation is ‘before tool change’ this means that the code will be added before all the automatic code:


Example for after tool change operation
In this case tool 18 was selected (any other could be selected, even a tool with before tool change or after cycle):

that results in:

Example for after cycle operation
In this case tool 18 was selected again:

That results in:
