If your bike and front fender arrangement looks something like mine (G5), then as an alternative method here is what I have done.I had made a 'loop' of two 3/4" plastic cable clamps attached with a spacer bought at ACE hardware store and used a plastic screw to attach to front fender for speedometer cable. The pictures show what it looks like on my G5.
Very clever. Thank you for sharing. Is that plastic tubing around the cable? What's the purpose of that?