Here is the script I am playing with to create an airfoil:
Units.Current = UnitTypes.Inches
myPart=CurrentPart()
mysketchobj_spline=myPart.AddSketch('Airfoil',myPart.XYPlane)
myOrder=4
myKnotVectors=[0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 49.0, 49.0, 49.0]
myControlPoints=[63.7775,0,60.5809717,0.04209315,57.383805625,-0.12117725,54.188552875,-0.383302775,50.99521345,-0.70537915,47.804425125,-1.059344275,44.616825675,-1.42734045,41.43113955,-1.79214775,38.248004525,-2.135908475,34.9806832,-2.449056,31.88875,-2.721385925,28.71135495,-2.939504975,25.53523545,-3.092570975,22.359753725,-3.16974175,19.184272,-3.161450675,16.0081525,-3.0715244,12.83075745,-2.898687375,9.6508113,-2.6301841,6.467676275,-2.244968,4.87387655,-1.986669125,3.276250175,-1.66204165,1.67224605,-1.2194258,0.864185125,-0.8979872,0.537644325,-0.714308,0.34312295,-0.5944063,0,0,0.265952175,0.6581838,0.419018175,0.8035965,0.730252375,1.03447105,1.51662895,1.4566781,3.101499825,2.06511545,4.69274845,2.527502325,6.287823725,2.90442735,9.4824387,3.48862925,12.68024255,3.914025175,15.8805975,4.21314165,19.082228,4.401285275,22.284496275,4.48355825,25.48676455,4.458685025,28.68839505,4.336232225,31.88875,4.128317575,35.0878294,3.84578325,38.284995475,3.502022525,41.47961045,3.10596425,44.671674325,2.66717505,47.861824875,2.200961525,51.04878655,1.72071695,54.233197125,1.241747925,57.415694375,0.7806366,60.5962783,0.36098065,63.7775,0]
myWeights=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
mysketchobj_spline.AddBspline(myOrder,myControlPoints,myKnotVectors,myWeights,0)
It looks good and the sketch checker is fine with it, but it cannot be used to extrude a solid. It says this:
Object reference not set to an instance of an object.
Mike