I visited the Caran d'Ache [1] factory in Geneva a few years back, it's very similar [2]. Except they have a system to be sure all the pencils are in the same position in the box, with the name on top. It's a system with a camera and shape recognition, used for high end sets.