At layer change plugin

I'm quite sure that there was a plugin or something similar years ago where i put in the number of the layer and the print paused.

I'm want to print magnet holder and want to insert the magnet after a number of layers.
I'm using now superslicer and count the number of layers and than hit pause in octoprint.

Or was it a gcode script, long ago ....

I'm printing with Qidi X-Max

You'd set it in the slicer, I do this a lot in Cura where it's a post processing plugin item of filament change but prusaslicer has it too and so will superslicer. Just google for detailed descriptions.

That said, at times I wish octoPrint had a button for it in the GCODE-viewer so I can adhoc decide on a filament change. I'm thinking of travelling to the exact progress point in the GCODE viewer and set a filamentChange-Tag for that exact spot. Additional pro would be that I could trigger a change not only at layer change points but just somewhere.

i'm so sure that i'd done it in octoprint.
With my Qidi Printer the M600 or M601 does not work (pause and color change) in SuperSlicer
after more searching i found M0 as a Replace for Qidi Printer
That works, yeah, but i'm getting this Warning -bloked command m0-
GCODE Viewer/Editor is a great idea

no i've a problem with the - Bevore resume- gcode

{% if pause_position.x is not none %}
; relative extruder
M83

; prime nozzle
G1 E-0.8 F4500
G1 E0.8 F4500
G1 E0.8 F4500

; absolute E
M82

; absolute XYZ
G90

; reset E
G92 E{{ pause_position.e }}

; WARNING!!! - use M83 or M82(exruder absolute mode) according what your slicer generates
M83 ; extruder relative mode

; move back to pause position XYZ
G1 X{{ pause_position.x }} Y{{ pause_position.y }} Z{{ pause_position.z }} F4500

; reset to feed rate before pause if available
{% if pause_position.f is not none %}G1 F{{ pause_position.f }}{% endif %}
{% endif %}

found this code in the forum,
but the last line ;Reset to feed....
leads to a rattling noise of the feeder, pressing a big blob til i canceled it
If commenting this line , the head resumed to print at X/Y but not Z so it prints one round in the air

There are extensions for cura and post processing scripts/options in SuperSlicer/PrusaSlicer for this type of operation. The one in Cura from a while back was called ChangeAtZ IIRC.

interesting, I see many options for changes at a certain height or layer but it was not evident on first sight how to trigger a M600 from there. Anyway, thanks for bringing this one to my attention