Guys, I need help in getting the coordinates of a point and displaying it in a message box by using the name of the point entity. In this case "sketch 5" using solidworks api.
I've gone through 'getselectedpoint2(1,-1)' but did'n't really understand much.
Can someone get me going on this..
First things first: "Sketch5" is not the point, it is a sketch that has a point in it.
You want to get the point out of the sketch first with ISketch.GetUserPoints2(), which will give you an array with information on all holes in this sketch.
in your case:
double pointCoords(Sketch sketch)
object sketchPoints = sketch.GetUserPoints2();
object thisPoint = sketchPoints;
double coords = (double)thisPoint;
Retrieving data ...