Hello hebboppp,
The whole trick is this: Do not set a rotation inside the Text command, so the default value will stay as it was.
In your program, issue the Text commnand with the default rotation by giving "" instead of the rotition variable that you've calculated within your program. When the Text command has completed, (cdr (assoc 50 (entget (entlast)))) will give you the rotation of the Text object you just placed in radians. Substract this from the rotation you desire, convert the value into your current angle dimension somewhere (depending on in what dimension your calculated value is) and use the Rotate command to give the Text object the actual desired rotation instead of the current default one.
Alternatively, when you have an understanding of the lisp command (entmod), you could use this to change the rotation of your object after it's placed by the Text command.
With friendly greetings, M. Moolhuysen.