3 Replies Latest reply on Sep 14, 2017 10:02 AM by John Maldonado

    How to get .SketchPoint object of SketchSegment End Points?

    John Maldonado

      Hello,

      I'm working on a macro that is meant to insert a line segment and then add relations to the line endpoints.

       

      So I create a sketch segment with: Set skSegment = swModel.SketchManager.CreateLine(x1, y1, z1, x2, y2, z2)

      My goal is to then get the .SketchPoint objects for both endpoints of the line segment. And the use .select4 method to select it.

      I know ISketchArc has a GetStartPoint2() method that does what I'm looking for, the problem is though that I have a SketchSegment object not a SketchArc object.

      I can't believe there is not a similar method for SketchSegment objects.

       

      I'm trying to avoid using SelectByID, because even though I know the xyz location of the endpoints, there is also another sketchpoint at the same exact location of the endpoints. I'm actually trying to get the endpoints to have coincident relations with those.

       

      Any help is appreciated,

      Thank you!