So it’s not about rotation at all… See what I mean. Why do you think this is about rotation?
What is this:
Where does it come from? Where does it go? This must be the StandardMacro isValid
but the param name is wrong - maybe because of the copy / paste.