"recall from" on all cues

I'm building a new showfile for a venue, that involves repatching a bunch of fixtures, i.e. in the old default file the cyc was 151->174 and in the new file it is 61->81. Is there a way to load up a cuelist from an old showfile and convert it to the new patch?
My best guess would be to import the cuelist from the old showfile, then run the following macro:

Macro_Loop_Begin
Chan 71 Thru 74 Recall_From 161 Thru 164
Go_To_Cue Next
Macro_Loop_End

But then I don't know how to end it when the macro gets to the last cue.

Related