You can create BSpline curves and surfaces using TransientGeometry.CreateBSplineCurve and TransientGeometry.CreateBSplineSurface methods. Not sure exactly what kind of workflow you are after, you would need to provide some more details about what you are trying to achive.
Here is a VBA sample that illustrates some of the work that can be done:
Public Sub SplineByNURBS()
' Create a new part document.
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.Documents.Add(kPartDocumentObject, _
ThisApplication.FileManager.GetTemplateFile(kPartDocumentObject))
' Set a reference to the part component definition.
Dim oCompDef As PartComponentDefinition
Set oCompDef = oPartDoc.ComponentDefinition
' Set a reference to the transient geometry collection.
Dim oTransGeom As TransientGeometry
Set oTransGeom = ThisApplication.TransientGeometry
'*** This next section of code creates a sketch that contains
'*** a single spline that is created using a NURBS definition.
' Create an array that contains the position of the poles
' of the spline. Since we're creating a sketch spline the
' coordinates are 2d and are in sketch space.
Dim adPoles(9) As Double
adPoles(0) = 0: adPoles(1) = 0
adPoles(2) = 1: adPoles(3) = 2
adPoles(4) = 2: adPoles(5) = -2
adPoles(6) = 3: adPoles(7) = 3
adPoles(8) = 4: adPoles(9) = 0
' Create an array that contains the knot information for the spline.
Dim adKnots(8) As Double
adKnots(0) = 0
adKnots(1) = 0
adKnots(2) = 0
adKnots(3) = 0
adKnots(4) = 0.5
adKnots(5) = 1
adKnots(6) = 1
adKnots(7) = 1
adKnots(8) = 1
' Define the array for the weights. Since the curve we're creating is
' not rational we don't need to provide any weight information.
Dim adWeights() As Double
' Create a spline that is order 4 and non-periodic. This just creates the
' curve as a transient geometry object, so there are still not any graphics
' within Inventor that represent this curve.
Dim oSpline2D As BSplineCurve2d
Set oSpline2D = oTransGeom.CreateBSplineCurve2d(4, adPoles, adKnots, adWeights, False)
' Create a sketch on the YZ plane.
Dim oSketch1 As PlanarSketch
Set oSketch1 = oCompDef.Sketches.Add(oCompDef.WorkPlanes.item(1))
' Create a fixed sketch spline using the transient BSplineCurve2d object we
' just created. This creates an actual sketch curve that has visible graphics.
Call oSketch1.SketchFixedSplines.Add(oSpline2D)
'*** This next section of code creates a sketch that contains a single
'*** spline that is created by fitting through a set of coordinates.
' Create a BSplineCurve2dDefinition object. This object collects the
' fit points, the fit method, and optionally weight and tangent information
' (which is not used in this sample).
Dim oFittedSplineDef As BSplineCurve2dDefinition
Set oFittedSplineDef = oTransGeom.CreateBSplineCurve2dDefinition
' Define the fit point coordinates.
Call oFittedSplineDef.AddPoint(oTransGeom.CreatePoint2d(0, 0))
Call oFittedSplineDef.AddPoint(oTransGeom.CreatePoint2d(1, -0.25))
Call oFittedSplineDef.AddPoint(oTransGeom.CreatePoint2d(2, 0.5))
Call oFittedSplineDef.AddPoint(oTransGeom.CreatePoint2d(3, -0.5))
Call oFittedSplineDef.AddPoint(oTransGeom.CreatePoint2d(4, 0))
' Define the fit method.
oFittedSplineDef.FitMethod = kSweetSplineFit
' Create the fitted spline. As before, this just creates a transient
' b-spline and does not have any associated graphics.
Set oSpline2D = oTransGeom.CreateFittedBSplineCurve2d(oFittedSplineDef)
' Create an offset work plane and a new sketch.
Dim oWP As workplane
Set oWP = oCompDef.WorkPlanes.AddByPlaneAndOffset(oCompDef.WorkPlanes.item(1), 7)
Dim oSketch2 As PlanarSketch
Set oSketch2 = oCompDef.Sketches.Add(oWP)
' Create a fixed sketch spline using the transient BSplineCurve2d object we
' just created. This creates an actual sketch curve that has visible graphics.
Call oSketch2.SketchFixedSplines.Add(oSpline2D)
' Create profiles from each of the sketch splines.
Dim oProfile1 As profile
Dim oProfile2 As profile
Set oProfile1 = oSketch1.Profiles.AddForSurface
Set oProfile2 = oSketch2.Profiles.AddForSurface
' Add the profiles to an object collection to be able to use them
' later as sections for the loft feature.
Dim oSections As ObjectCollection
Set oSections = ThisApplication.TransientObjects.CreateObjectCollection
oSections.Add oProfile1
oSections.Add oProfile2
' Create a loft feature. This creates a work surface.
Dim oLoft As LoftFeature
'Set oLoft = oCompDef.Features.LoftFeatures.Add(oSections, kSurfaceOperation)
Dim oLD As LoftDefinition
Set oLD = oCompDef.features.LoftFeatures.CreateLoftDefinition(oSections, kSurfaceOperation)
Set oLoft = oCompDef.features.LoftFeatures.Add(oLD)
' Get the work surface and turn off its visibility.
Dim oWorkSurface As worksurface
Set oWorkSurface = oLoft.faces.item(1).SurfaceBody.Parent
oWorkSurface.Visible = False
' Create an object collection to use as input for the thicken feature to
' define the face we want to thicken.
Dim oFaces As ObjectCollection
Set oFaces = ThisApplication.TransientObjects.CreateObjectCollection
oFaces.Add oLoft.faces.item(1)
' Create the offset feature.
Dim oThicken As ThickenFeature
Set oThicken = oCompDef.features.ThickenFeatures.Add(oFaces, 0.2, kPositiveExtentDirection, kSurfaceOperation)
End Sub
Philippe.
Philippe Leefsma
Developer Technical Services
Autodesk Developer Network