This should get you going, it will do your first sweep feature :
Public Sub SweepFeature()
'reference the part doc
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.ActiveDocument
'reference to the sketches
Dim oSketches As PlanarSketches
Set oSketches = oPartDoc.ComponentDefinition.Sketches
'get the TOOL 1 sketch
Dim oSketch As PlanarSketch
Set oSketch = oSketches.Item("TOOL 1")
' Create a profile from oSketch (TOOL 1)
Dim oProfile As Profile
Set oProfile = oSketch.Profiles.AddForSolid
'get the PATH sketch
Dim oSketch2 As PlanarSketch
Set oSketch2 = oSketches.Item("PATH")
'get the first line in the sketch
Dim oSketchLine1 As SketchLine
Set oSketchLine1 = oSketch2.SketchLines.Item(1)
'set oSketchLine1 as the path
Dim oPath As Path
Set oPath = oPartDoc.ComponentDefinition.Features.CreatePath(oSketchLine1)
'get the RAIL 1 sketch (a 3D sketch in this case, not a planar sketch)
Dim oSketches3D As Sketches3D
Set oSketches3D = oPartDoc.ComponentDefinition.Sketches3D
Dim oSketch3D As Sketch3D
Set oSketch3D = oSketches3D.Item("RAIL 1")
'get the first spline in the sketch
Dim oSketchSpline As SketchSpline3D
Set oSketchSpline = oSketch3D.SketchSplines3D.Item(1)
'set the spline as the guide path
Dim oGuide As Path
Set oGuide = oPartDoc.ComponentDefinition.Features.CreatePath(oSketchSpline)
'do the sweep feature with Path and Guide Rail
Dim oSweep As SweepFeature
Set oSweep = oPartDoc.ComponentDefinition.Features.SweepFeatures.AddUsingPathAndGuideRail(oProfile, oPath, oGuide, PartFeatureOperationEnum.kCutOperation, SweepProfileScalingEnum.kNoProfileScaling)
End Sub
If you search in the API help ( ? > Additional Resources > Programming Help ) for 'sweep' you will find some help in there. Theres also some sample code in the help to create a sweep feature.
Hope this helps
Tom