I’m trying the rs.PlaneFitFromPoints function.
Using the example in the RhinoPython Help:

    import rhinoscriptsyntax as rs
    points = rs.GetPoints()
    if points:
        plane = rs.PlaneFitFromPoints(points)
        if plane:
            magX = plane.XAxis.Length
            magY = plane.YAxis.Length
            rs.AddPlaneSurface( plane, magX, magY )

an error occurred:
Message: ‘type’ object has no attribute 'index
line 402, in coerce3dpointlist, "C:…\"
line 119, in PlaneFitFromPoints, "C:…\"
line 5, in , “C:…\

Hmm, your code snippet above seems to be working here… --Mitch

Thanks Mitch. Using the WIP is all good. I’ll try to restart Rhino.

Ok, Rhino 5 works too.