; host.choose_material(title:"Confirm the material you are unloading.")

; host.show_message(title:"Waiting for extruder to heat to [temperature], before unloading.")
M106 S0 ; turn off the fan
G4 S1               ; wait message to display
M109 S[temperature] ; heat up the extruder

M302 S0  ; Allow extrusion at any temperature
; host.show_message(title:"Unloading filament..." count_down:28)
G92 E0              ; reset the extruder position to 0
G91                 ; Relative positioning
G1 E15 F600         ; push some out first
G1 E-[unload_filament_length_over_six] F[load_filament_speed]      ; unload the filament 
G1 E-[unload_filament_length_over_six] F[load_filament_speed]      ; unload the filament 
G1 E-[unload_filament_length_over_six] F[load_filament_speed]      ; unload the filament 
G1 E-[unload_filament_length_over_six] F[load_filament_speed]      ; unload the filament 
G1 E-[unload_filament_length_over_six] F[load_filament_speed]      ; unload the filament 
G1 E-[unload_filament_length_over_six] F[load_filament_speed]      ; unload the filament 
G4 S1               ; wait for move to finish
G90                 ; Absolute positioning
G92 E0              ; reset the extruder position to 0

M302 S150  ; Set cold extrude temp back to reasonable

; turn the extruder temperature off if not printing, else leave it at new load temp.
; host.done_load_unload()
