I had to use some tie wire that I hooked onto the cord to pull through each pole. Not sure if it was because they were cheap tent poles or I got the wrong cord but there was no finessing the cord through each one without the wire
It is a fairly straight forward process. I would use the old shock cord for a basic measurement or just overall pole length. You pull the aluminum grommet pin on the end of the end piece then tie the shock cord to that then thread each pole on the cord. Then put a little stretch and tie off the other end same fashion. I just go off feel on the elastic tension. You'll be able to tell when it allows you to pull them apart and fold easily but still maintains enough elasticity to have the sections pull together.
They actually sell kits to replace it. Just google it. As far as length, I would just run it through and then pull it tight until desired tension is achieved. Then tie it off.