Dynamo - renumber sheets for detail callouts by selection

Hi all,

I am trying to find a way of renumbering sheets for detail callouts in a specific order.
we are adding new details all the time and need to find a way to quickly renumber sheets in a logical way (ie clockwise around building perimeter). my attempts below. can’t seem to get the sheet list generated from the selection to map properly. Any advice would be great or if anyone has a better way to achive this…

RenumberDetailCalloutsBySelection_v1.dyn (17.5 KB)