To make sure I was telling you the correct thing I went ahead and wrote a small function to test this. Below is a VBA sub and function. The Sub gathers the input and calls the function which computes the points and passes them back, and then the sub highlights them.
Public Sub PathTest()
Dim partDoc As PartDocument
Set partDoc = ThisApplication.ActiveDocument
Dim skEnt As SketchEntity
Set skEnt = ThisApplication.CommandManager.Pick(kSketchCurveFilter, "Select sketch curve")
Dim startPoint As SketchPoint
Dim endPoint As SketchPoint
If GetEndPointsOfPath(skEnt, startPoint, endPoint) = True Then
Dim hs As HighlightSet
Set hs = partDoc.CreateHighlightSet
hs.AddItem startPoint
hs.AddItem endPoint
MsgBox "Test"
hs.Clear
End If
End Sub
Public Function GetEndPointsOfPath(ByVal SeedCurve As SketchEntity, ByRef Point1 As SketchPoint, ByRef Point2 As SketchPoint) As Boolean
On Error GoTo ErrorFound
Dim partDef As PartComponentDefinition
Set partDef = SeedCurve.Parent.Parent
Dim pth As Path
Set pth = partDef.Features.CreatePath(SeedCurve)
Dim pathEnt As PathEntity
Set pathEnt = pth.Item(1)
If pathEnt.SketchEntity.StartSketchPoint.AttachedEntities.Count = 1 Then
Set Point1 = pathEnt.SketchEntity.StartSketchPoint
Else
Set Point1 = pathEnt.SketchEntity.EndSketchPoint
End If
Set pathEnt = pth.Item(pth.Count)
If pathEnt.SketchEntity.StartSketchPoint.AttachedEntities.Count = 1 Then
Set Point2 = pathEnt.SketchEntity.StartSketchPoint
Else
Set Point2 = pathEnt.SketchEntity.EndSketchPoint
End If
GetEndPointsOfPath = True
Exit Function
ErrorFound:
If Err Then
GetEndPointsOfPath = False
Exit Function
End If
End Function