A process for producing shaped bodies for heat exchangers, comprising a thermomagnetic material selected from compounds of the general formula (A y B 1-y) 2+δ C w D x E z where A is Mn or Co, B is Fe, Cr or Ni, C, D and E at least two of C, D and E are different, have a non-vanishing concentration and are selected from P, B, Se, Ge, Ga, Si, Sn, N, As and Sb, δ is a number in the range from -0.2 to 0.2, w, x, y, z are numbers in the range from 0 to 1, where w + x + z = 1; La- and Fe-based compounds of the general formulae and/or and/or La (Fe x Al 1-x) 13 H y or La (Fe x Si 1-x) 13 H y where x is a number from 0.7 to 0.95, y is a number from 0 to 3; La(Fe x Al y Co z) 13 or La(Fe x Si y Co z) 13 where x is a number from 0.7 to 0.95, y is a number from 0.05 to 1 - x, z is a number from 0.005 to 0.5; LaMn x Fe 2-x Ge where x is a number from 1.7 to 1.95 and Heusler alloys of the MnTP type where T is a transition metal and P is a p-doping metal having an electron count per atom e/a in the range from 7 to 8.5, Gd- and Si-based compounds of the general formula Gd 5 (Si x Ge 1-x) 4 where x is a number from 0.2 to 1, Fe 2 P-based compounds, manganites of the perovskite type, compounds which comprise rare earth elements and are of the general formulae and Tb 5 (Si 4-x Ge x) where x = 0, 1, 2, 3, 4, XTiGe where X = Dy, Ho, Tm, Mn- and Sb- or As-based compounds of the general formulae (VIII) and Mn 2-x 2 x Sb (VIII) Mn 2 Z x Sb 1-x where Z is Cr, Cu, Zn, Co, V, As, Ge, x is from 0.01 to 0.5, where Sb may be replaced by As when Z is not As, said shaped bodies having channels for passage of a fluid heat exchange medium, which comprises introducing a powder of the thermomagnetic material into a binder, applying the resulting molding material to a carrier by rapid prototyping/3D printing and subsequently removing the binder and optionally the carrier, and sintering the resulting green body, and printing a plurality of different thermomagnetic materials alongside one another and/or one on top of another, such that different thermomagnetic materials which exhibit a magnetocaloric effect at different temperatures are present in the same shaped body the three-dimensional arrangement of different thermomagnetic materials along at least one spatial axis being such that the result is a quasicontinuous rise or decline in the temperature at which the magnetocaloric effect occurs in each case along this at least one spatial axis. compounds of the general formula (A y B 1-y) 2+δ C w D x E z where A is Mn or Co, B is Fe, Cr or Ni, C, D and E at least two of C, D and E are different, have a non-vanishing concentration and are selected from P, B, Se, Ge, Ga, Si, Sn, N, As and Sb, δ is a number in the range from -0.2 to 0.2, w, x, y, z are numbers in the range from 0 to 1, where w + x + z = 1; A is Mn or Co, B is Fe, Cr or Ni, C, D and E at least two of C, D and E are different, have a non-vanishing concentration and are selected from P, B, Se, Ge, Ga, Si, Sn, N, As and Sb, δ is a number in the range from -0.2 to 0.2, w, x, y, z are numbers in the range from 0 to 1, where w + x + z = 1; La- and Fe-based compounds of the general formulae and/or and/or La (Fe x Al 1-x) 13 H y or La (Fe x Si 1-x) 13 H y where x is a number from 0.7 to 0.95, y is a number from 0 to 3; La(Fe x Al y Co z) 13 or La(Fe x Si y Co z) 13 where x is a number from 0.7 to 0.95, y is a number from 0.05 to 1 - x, z is a number from 0.005 to 0.5; LaMn x Fe 2-x Ge where x is a number from 1.7 to 1.95 and x is a number from 0.7 to 0.95, y is a number from 0 to 3; x is a number from 0.7 to 0.95, y is a number from 0.05 to 1 - x, z is a number from 0.005 to 0.5; x is a number from 1.7 to 1.95 and Heusler alloys of the MnTP type where T is a transition metal and P is a p-doping metal having an electron count per atom e/a in the range from 7 to 8.5, Gd- and Si-based compounds of the general formula Gd 5 (Si x Ge 1-x) 4 where x is a number from 0.2 to 1, Fe 2 P-based compounds, manganites of the perovskite type, compounds which comprise rare earth elements and are of the general formulae and Tb 5 (Si 4-x Ge x) where x = 0, 1, 2, 3, 4, XTiGe where X = Dy, Ho, Tm, Mn- and Sb- or As-based compounds of the general formulae (VIII) and Mn 2-x 2 x Sb (VIII) Mn 2 Z x Sb 1-x where Z is Cr, Cu, Zn, Co, V, As, Ge, x is from 0.01 to 0.5, where Sb may be replaced by As when Z is not As, said shaped bodies having channels for passage of a fluid heat exchange medium, which comprises introducing a powder of the thermomagnetic material into a binder, applying the resulting molding material to a carrier by rapid prototyping/3D printing and subsequently removing the binder and optionally the carrier, and sintering the resulting green body, and printing a plurality of different thermomagnetic materials alongside one another and/or one on top of another, such that different thermomagnetic materials which exhibit a magnetocaloric effect at different temperatures are present in the same shaped body the three-dimensional arrangement of different thermomagnetic materials along at least one spatial axis being such that the result is a quasicontinuous rise or decline in the temperature at which the magnetocaloric effect occurs in each case along this at least one spatial axis. Z is Cr, Cu, Zn, Co, V, As, Ge, x is from 0.01 to 0.5,