Get coordinates point in a sketch (Problem negativ/positiv value)

Hi everyone

I use this code to get the point coordinates where i just clicked with my mouse:

Its working if i select a sketch point, and also if i click on 3D Model surface.

<p>Sub main()</p><p>Dim swApp As SldWorks.SldWorks</p><p>Dim Part As ModelDoc2</p><p>Dim SelMgr As SldWorks.SelectionMgr</p><p></p><p>Set swApp = Application.SldWorks</p><p>Set Part = swApp.ActiveDoc</p><p>Set SelMgr = Part.SelectionManager</p><p>    </p><p>Dim point As Variant</p><p>point = SelMgr.GetSelectionPoint2(1, -1)</p><p></p><p>Debug.Print point(0) 'X</p><p>Debug.Print point(1) 'Y</p><p>Debug.Print point(2) 'Z</p><p></p><p>End Sub</p>

I don't know why, sometime, when i'm editing a sketch, the coordinate axes can be reversed:

As you can see in this example, the 'X' axe of the sketch is in a reverse sens of the 'X' axe of the 3D model.

So if i click on a sketch point, i have the sketch coordinates.

And if i click on the surface of the Model, i got the 3D model coordinate  ...:  the negative of the X sketch coordinates, even if its in the same location.

Then if i want to insert a block in the sketch, by the way of clicking on the Model surface,

the block will appear in the symetrie of 'Y' axe, because  X = - X.

Can you have a solution to coordonate (haha) the landmark?

Maybe a different code or a VBA trick?

Thank you very much!

SolidworksApi macros