Some have suggested: to check if the state.status is "processing" when homing.
Problem: It is always "processing" the moment the print is started, so homing never occurs during the print. Which means, you start the print and then get many not homed errors.
I set a global variable in config.g and checkit in the homing files. Call the enable/disable in the slicer's start gcode and a enabie in the end gcode.
Note: you will get homing failed errors when homing is disabled in the homing files.
In config.g:
if !exists(global.DisableHoming)
global DisableHoming=false ;create variable for use in homing
else
set global.DisableHoming=false ;reset variable for use in homing
In the homeing files add at the beginning:
if global.DisableHoming
M99
EnableHoming macro:
set global.DisableHoming=false
DisableHoming macro:
set global.DisableHoming=true
In the slicer's start gcode:
M98 P"EnableHoming"
G28 ; home all axes
M98 P"DisableHoming"
Add M98 P"EnableHoming" in the end gocde in the slicer