If I look at the script they are doing a few 'tricks' to make sure mirrored / rotated objects don't missbehave.
But it mostly just uses GLOB_NORTH_DIR, which grabs the north location from what you've set up in Project Preferences.
Check the 2D and 3D script.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nlArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5