On 06/02/2017 at 16:07, xxxxxxxx wrote:
Coded in 5 min and I guess the code it's self explanatory but if you want more information feel free to ask 
import c4d
def main() :
spline = op
test_spline = spline.GetRealSpline()
if not test_spline:
return
doc.StartUndo()
sweep = c4d.BaseObject(c4d.Osweep)
doc.AddUndo(c4d.UNDOTYPE_NEW, sweep)
sweep.InsertAfter(spline)
doc.AddUndo(c4d.UNDOTYPE_HIERARCHY_PSR, spline)
spline.InsertUnder(sweep)
circle = c4d.BaseObject(c4d.Osplinecircle)
circle[c4d.PRIM_CIRCLE_RADIUS] = 10 #change the radius of the circle here
doc.AddUndo(c4d.UNDOTYPE_NEW, circle)
circle.InsertUnder(sweep)
doc.EndUndo()
c4d.EventAdd()
if __name__=='__main__':
main()