Use your tent poles or the old shock cord to measure the appropriate length. Always measure slightly longer than the tent poles and shorten it later. If you are using the old shock cord as a guide, be careful not to cut it too long or short. If the elasticity of the old cord is gone, it won't be easy to get a proper measurement, and using the poles might be easier.