Comment on Heat setting magnets is bad.
cmnybo@discuss.tchncs.de 2 weeks ago
The most common grades of neodymium magnets will demagnetize at around 60-80°C. Even if they could handle the temperature, they wouldn’t stay in place well since they are smooth.
Epoxy and super glue both work well for gluing the magnets in a hole. Rough up the back side if the magnet so the glue has something to hold on to though.