How to integrate the orientation (North, East, South, ..) in a dynamic component?

I want to integrate automatically the orientation in a component. How to do ? Formula ?

SUNANGLE() The SUNANGLE function returns the angle (in degrees) between the sun and the current model’s North direction.
Normally it’s the green direction, but I am not sure if it detects modeling axes.