Aligning a markup plane to world coordinate system, with orthogonal planes

If i have well understood your requirement, this reply to a more or less similar question may be helpful. If you copy and paste the reference codes in your application startup file, you’ll get a nice GUI as a toolbar to perform such reslicing.