Customizable case for carrying cylindrical batteries. Requires small cylindrical magnets to hold the case closed. I used 3x3mm cylinder magnets* which works well to hold the lid in place.
For a version that doesn't require magnets, try:
Printer: Afinia H-Series
Create a top and bottom piece (the sum of the heights of the two parts should be equal or slightly larger than the battery height, you can divide it up any way you want).
Press fit or glue the magnets into the columns between the batteries. Make sure they're oriented correctly or you can use a magnet on one side and a steel bearing or pin on the other. The minimum size that works with magnets is 2x2 batteries. You can generate carriers for other sizes (like 1x4), but there won't be a slot for the magnet.
for reference, here are some common battery heights:
AA - 50.5mm
AAA - 44.5mm
CR123A - 34.5mm
CR2 - 27mm