If scratch building, it's possible to make a jig out of threaded rods (metric M6 screws have 1mm pitch, for instance). To do this, bend a length of threaded rod (should be available at most hardware stores) into a rectangle, then wrap your railing wire around the jig at set distances and glue...