Is it possible to get the sketch fully constrained (as it was) after redefining the sketch plane parallel to the original sketch plane. using API
Solved! Go to Solution.
Solved by ekinsb. Go to Solution.
When you redefine a sketch any sketch geometry that was created by projecting model geometry into the sketch (work point, work axis, model edge, etc.) loses the association to the geometry it was originally created from. You can't just reconnect the sketch entities back to the model geomtry they were originally projected from. In most cases it means deleting the entities from the sketch, re-projecting the model geometry and re-creating the constraints. It's all possible via the API but isn't particularly simple.
A common modeling practice is to project the origin work point into a sketch and constrain everything to it. If this is the only model geometry projected into the sketch, then it's a bit easier. You can project the origin point into the new sketch and use the SketchPoint.Merge method to combine the point that was created by projecting the origin point and the new point. This will also maintain all of the constraints so no further work is needed.