Unlocking temporary sketch relationships in API

Hi all,

As per the discussion over in this thread (https://forum.solidworks.com/thread/65674?start=0&tstart=0) I'm trying to get around a sticky situation with moving a point that's constrained by a temporary sketch relation.

For example, see in the attached SLDPRT, there's a sketch that consists of a fully defined contour and a second contour that's offset from the first by 10mm.

The offset contour (let's call this "C2" for ease of typing) is fully defined (all black), however I'm still able to click and drag either endpoint of C2, and the points will move relative to their constraints (a horizontal line at left and a 60mm arc at right). Once they've been dragged they turn blue and we can add sketch relations to them (for example, make the RH point of C2 coincident with the front plane). However, if we try to add relationships/dimensions etc BEFORE they've been dragged, then the sketch goes over-defined. Quizzically, we can drag it while it's over-defined and it goes fully-defined and the errors clear and the points jump to where we want them. We can also "unlock" these points by manipulating the X/Y parameters in the feature manager.

This is a long-known behaviour of this kind of geometry and also in sheetmetal edge-flange sketches and we can work around it. But how do we deal with this in API? You can't click-and-drag points to "unlock" them, so you're unable to move / define the end-points of an offset curve using the API interface without manual click/drag intervention.

Does anyone have a workaround or a possible solution for this? In my example file I'd like some code to take the right-hand point of C2 and add a coincident relation to the front plane without any non-code intervention. Is this impossilbe as I fear?

Thanks!

George.

SolidworksApi macros