A good way to measure is to use a long piece of wire and use it to model your throttle cable.
Bend it to shape whilst allowing for slack and flex.
EDIT: ..and then measure your wire with a tailor's tape measure, along its length.
Otherwise, buy it in too-long lengths and trim it to fit. That's what 9/10ths of people do.