I created an Editor Extension and am listening to the OnSketchModified event. Inside that, I have:
ISketchTool sketchTool = ArcMap.Editor.Parent.CurrentTool.Command as ISketchTool;
if (sketchTool == null)
return;
double angle = 0.0; //radians
sketchTool.Constraint = esriSketchConstraint.esriConstraintAngle;
sketchTool.AngleConstraint = angle;
When I create a Polygon feature, this all runs without error but the sketch is still unconstrained.