Hey, sorry I can’t check it right now, but I would maybe try a zip rather than for…? So you’re iterating through both lists together? Something like…
for v, r in zip(viewports, rot):
crpbx = GetViewCropBoxElement(v)
crpbxRt = RotateCropBox(v, crpbx, r)
Hopefully that is helpful
Mark