Text Sketch Curve empty

Hello, I am trying to align a text sketch along a construction line, but it doesn’t seem to be working. The coordinates are correct, as the text is placed at the center of the line, but it is not following the line's orientation. Any idea where I got it wrong ?

 

                sub CreateText ()
                ......
                Dim aSketchPoint1() As Double
                Dim aSketchPoint2() As Double
                aSketchPoint1 = globalPointToSketchPoint(aMidPoint1, swSketch)
                aSketchPoint2 = globalPointToSketchPoint(aMidPoint2, swSketch)
               
                Dim skSeg As SketchSegment
                Set skSeg = swSketchMgr.CreateCenterLine(aSketchPoint1(0), aSketchPoint1(1), aSketchPoint1(2), _
                                             aSketchPoint2(0), aSketchPoint2(1), aSketchPoint2(2))
                skSeg.Select2 False, 1
                Dim skText As SldWorks.SketchText
                Set skText = swModel.InsertSketchText((aSketchPoint1(0) + aSketchPoint2(0)) / 2, _
                                                  (aSketchPoint1(1) + aSketchPoint2(1)) / 2, _
                                                  0, _
                                                  strEngrave, 1, 0, 0, 100, 100)
                ......
                End Sub