In the near future I intend to implement macro files for external switch triggers. The gcodes for configuring this are already defined, see [
reprap.org] and also M582. You could use a microswitch to detect when the filament runs out, and have this trigger the macro file.
In the macro file you can move the head out of the way (see how the pause.g file does it). Then use the M563 command to redefine the tool whose filament has run out to use a different extruder and nozzle, and the G10 command to set up the X and Y offsets for that nozzle. Then move the head back to the original location (see resume.g).
I suggest you try setting up a macro file or files like this, then you will be able to identify any additional issues, and you will be ready to use it when I implement the feature.
Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod
Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].