Hi, my configuration including macros is here:
MULTI HOTEND
If a hotend of type 2 IN 1 OUT (or xx IN 1 OUT) is used, the filament is automatically replaced outside the printing area.
By default, it is set to the endstop position + 20 mmm. Also tested on IDEX.
The variable for the currently installed filament is saved on the SD card, so that the last configuration is set when the printer is turned on.
The macro is here: MULTI_HOTEND.cfg
This macro is automatically called from the : SETTINGS_TOOL macro
For printers on the IDEX system from the macro: ACTIVATE_CARRIAGE
The macros listed on my Github are universal for configurations
printers for 2 to 4 extruders including dual carriage (IDEX)
This is an example of printer HW configuration for IDEX and 2 IN/1 OUT
# shared heater and sensor HE0 + HE1 and HE2 + HE3
[duplicate_pin_override]
pins: PF6, PB0, PA0, PC5
# ---- carriage X ----
[extruder]
...
heater_pin: PF6 # HE0
sensor_pin: PB0 # TH0
...
[extruder1]
...
heater_pin: PF6 # shared HE
sensor_pin: PB0 # shared TH
...
# ---- dual carriage ----
[extruder2]
...
heater_pin: PA0 # HE 2
sensor_pin: PC5 # TH 2
...
[extruder3]
...
heater_pin: PA0 # shared HE
sensor_pin: PC5 # shared TH
...
-Petr