Atharv Joshi
Forum Moderator

So here you need to make changes the following changes and try. 
Ensure that you can in 3D mode before running the script. 

curveSelList = Selection.Create(GetRootPart().Curves[0])
result=TubeBody.Create(curveSelList,MM(5),ExtrudeType.Add)

You can also make the selection with the help of Curve Selection commoand. 

curveSelList = CurveSelection.Create(GetRootPart().Curves[0])

Regards
Atharv