Try something like this:
app = adsk.core.Application.get()
ui = app.userInterface
doc = app.activeDocument
rootComp = doc.design.rootComponent
sketches = rootComp.sketches
sketch1 = sketches.itemByName("Sketch1")
sketch2 = sketches.itemByName("Sketch2")
axis = sketch1.sketchCurves.sketchLines.item(0)
profile = rootComp.createOpenProfile(sketch2.sketchCurves.item(0), True)
revolves = rootComp.features.revolveFeatures
revInput = revolves.createInput(profile, axis, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
angle = adsk.core.ValueInput.createByReal(math.pi*2)
revInput.setAngleExtent(False, angle)
revInput.isSolid = False
ext = revolves.add(revInput)
Sketch 1 and 2 might be reversed in your situation.
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Blog: hjalte.nl - github.com