well........you have two choices. Either import the custom command UG provided to handle coordinate system rotation, or, do like I did and lie to the machine and tell it your machine is a table table (to get output in a principle plane), and add G68 blocks, with tcl code, everytime there is a different B val0e. email me at Derek.Karpinski@sfketema.com for more information, or if you want to send me your post, I can take a look at it to modify it to suit your needs.
-Derek