Lines selection for boundary surface

Dear Community:

I need to build boundary surface based on two closed spline located on two different sketches. No problem when I am doing it manualy through UI - in the model select activate 'Boundary Surface' dialog, click on one spline, then on another one, then OK and surface is there!

From API I found example in SW Help 'Insert Boundary Surface Feature (VBA)' but with all my effort cannot implement it.

To use SetNetBlendCurveData I have to select both splines:

swDoc.Extension.SelectByID2("Spline1", "SKETCHSEGMENT", x1, y1, z1, False, 0, Nothing, 0)

swDoc.Extension.SelectByID2("Spline1", "SKETCHSEGMENT", x2, y2, z2, True, 1, Nothing, 0)

where xyz are model (global) coordinates of spline starting point, but this selection does not work! Both lines return "False".

(Each sketch has one stand alone point and one spline curve with name "Spline1")

Cannot figure out what I am doing wrong



Any ideas?

Thanks in advance,

Simon

SolidworksApi macros