I had some concern that doing this while the mount is still attached to the lens might cause damage due to severe vibrations.
While I can´t say for sure this can´t happen, I´d say the vibs are not severe at all. I used a small, spherical file (just like a scaled-up version of what dentists use to make your day...
), and it does cut rather quickly, so you don´t have to apply much force; you only want pits that are less than 0.5 mm deep.
And, you only need to do the black bits, not the white ones that are on the "real" Leica codings, so for many lenses it´s just a little milling to do. BTW, if there are adjacent black bits in a code pattern, don´t try to make separate pits for each of them; just make a single area that covers them all.
I strongly recommend trying and practising on some scrap metal first; the file is prone to wander on the surface if you´re not careful, and you certainly don´t want that! Another thing: even those shallow pits will go through the chrome and expose brass, but then, of course you´ll end the work by painting it. I didn´t just "brush" the paint on; I filled the whole pit with Humbrol Mat Black Enamel from a model shop. When it dried, it had shrunk somewhat, so the paint surface was below the plane of the mount itself.
I'd also be worried about getting any metal filings or debris into the lens mechanisms.
Cheers,
A real danger, of course. Wrap the lens almost entirely in a plastic bag or similar, using masking tape, so only the actual working area is exposed. Blow and brush away the filings from the covering before removing it.
Besides, even if you use a template, try at first to code with just a marker to ascertain that the code is placed exactly where it should be, before starting to mill.