To be able to re-use the code I put it into a rotateCustomObject(customObjectHandle, axis, angle) function. And shared it (SW-4464-9632-0709), if you are interested.
Maybe I will have to update it, because the movement was not tested yet, and I think also of being able to set a rotation origin :---)
If you find bugs, thanks for the feedback - if you have a suggested fix, go ahead, thanks.

rotateCustomObjectCode.jpg

rotateCustomObject_screen.jpg