Get the rotation of a cable tray

I have written a script that places hangers on a cable tray. It works fine as long as the cable tray is horizontal. I want the hanger family to line up with the
cable tray.

How do I get the rotation of the cable tray. I tried using the node Element.get.rotation. See attached image

The element.Get.Rotation node works fine for a door but not a cable tray

Any ideas


Please upload a sample Revit file (preferably in an older version) with a rotated cable tray and other elements relevant to your issue.

up !

Already available :

Thx for your answer but how to rotate a cable tray since the geometry.rotate dont accept cable trays ?