Since you probably have a
shackle splice to the end of both old and new halyards you cannot really just pull the new one in with the old. You need to use a light
line, maybe 1/4" and secure it to the tail of the old halyard and then pull the old halyard out.
Once that is done you can measure the old halyard and you will know what length you need. Make sure you are happy with the length of the old one and a couple of extra feet never hurt.
You can likely secure the messenger
line and halyard with duct tape however if you want to be really sure stitch them.
Good Luck
Gary