Problem in Using API to generate a loft feature

Hello,

Here is a problem about using API to generate a loft feature. Before executing this loft function, a 3DSketch, some reference planes and some sketches were created, which are shown in Figure 1.

After that, we are going to use the Loft function (FeatureManager.InsertProtrusionBlend) by selecting the corner points in two sketches. I rewrite this loft function in the main function, and save the model’s status in a file named “SketchesToLoft.SLDPRT”,

I found that if I change the view angle, the result sometimes differs from the previous result. Please check the figure 1 to 4.

Is there any prerequisite that needed to be set before executing the loft function?

The main function and the model file are attached.

Is there somebody could help me to find out a solution?

Figure 1

Figure 2

Figure 3

Figure 4

SolidworksApi macros