maybe this is overkill but...
Public Sub UCStoFrontDirection()
'if my building rotates so does my front direction
Dim x As Double = 0
Dim y As Double = 0
Select Case FrontDirection
Case 0
'nothing to do
Case 0 To 0.5 * Math.PI
y = Math.Sin(FrontDirection * 180 / Math.PI)
x = Math.Cos(FrontDirection * 180 / Math.PI)
Case 0.5 * Math.PI To Math.PI
y = Math.Cos((FrontDirection * 180 / Math.PI) - 90)
x = -Math.Sin((FrontDirection * 180 / Math.PI) - 90)
Case Math.PI To 1.5 * Math.PI
x = -Math.Cos((FrontDirection * 180 / Math.PI) - 180)
y = -Math.Sin((FrontDirection * 180 / Math.PI) - 180)
Case 1.5 * Math.PI To 2 * Math.PI
x = Math.Sin((FrontDirection * 180 / Math.PI) - 270)
y = -Math.Cos((FrontDirection * 180 / Math.PI) - 270)
End Select
ed.CurrentUserCoordinateSystem = Matrix3d.WorldToPlane(New Vector3d(x, y, 1))
End Sub
The key line is the bottom one, ed(editor).CurrentUserCoordianteSystem