It is a post thing - but there is an out of the box ude meant to provide this capability. You can try "Lock Axis" ude. Pick the plane and then in that plane lock one of the linear axes as needed. XY motion should be replaced by a linear and a rotary.
Take a look at some of the samples. Turn on the Start Events column in the Operation Navigator, and check out the UDEs. If you go to Menu > Help > Manufacturing Tutorials > Open a Sample Part, there is a basic mill turn sample, plus some more advanced ones like sim15.