Strange PP action

Hello

I am getting an apparent strange order of gcode commands from my PP. It apparently has to do with the order the OnPenUp and OnNewOperation functions are evaluated. On the first operation in a file it appears to be the way I would expect it but not on subsequent ones. Please see the attached code snippet:

  ...
  X8.906 Y2.209 I-0.056 J-0.030
  X8.841 Y2.276 I-0.003 J0.062
  (Operation: No Offset, outside, T41: Finecut 14ga steel)
  M5
  o<endcut> call
  G0  Z2.250
  ...

I would expect the new operation message to be posted after the o call (after the OnPenUp function). What should be happening here? Please find attached the text of the PP I am trying to use. This is a work in progress and not for production use.

John
My_third_try_LCNC.scpost (27.1 KB)

If the first cut of a new operation starts at the end of the previous cut or you have a chaining move SheetCam won’t lift the cutter. It can only work this out after the opertion has started which is why you get new operation before it lifts the cutter.