Camp:
Another option is to open the Window ID Marker you want to emulate and see how the text rotation/placement is handled there. For instance, if you are using the
Basic Window-Door Marker, go to
Open Object By Subtype... then drill down to Drawing Symbol > Marker > Window-Door Marker > Basic Window-Door Marker and check the 2D Script to see Graphisoft's solution. As the other posters noted, it will not be simple solution.
You should add a Signature to your Profile (click the Profile button near the top of this page) with your ArchiCAD version and operating system (see mine for an example) for more accurate help in this forum.
David