How to fix the line endpoints in sketch with VBA?

I need to fix the line in the sketch and I tried this code and It work for the lines but not the end points.

Can anyone help me on this ?

Thanks.

vSegs = swSketch.GetSketchSegments

For i = 0 To UBound(vSegs)
 
Set swSkSeg = vSegs(i)
 
swSkSeg.Select4 True, Nothing
 
Next

swModel.SketchAddConstraints "sgFIXED"