here’s an example (no extensive error checking):

```
import Rhino
import rhinoscriptsyntax as rs
def orient_curves():
"""
example to orient planar curves to world XY plane
"""
curves = rs.GetObjects("select curves to orient", 4)
if not curves:
return
new_curves=[]
for curve in curves:
plane = rs.CurvePlane(curve)
if plane:
transform = Rhino.Geometry.Transform.ChangeBasis( Rhino.Geometry.Plane.WorldXY, plane)
rs.TransformObject(curve, transform)
new_curves.append(curve)
for curve in new_curves:
#align curves left
bb = rs.BoundingBox(curve)
trans = -bb[0]
rs.MoveObject(curve, trans)
while len(new_curves)>0:
#spread the curves
bb = rs.BoundingBox(new_curves[0])
trans = bb[1]-bb[0] +Rhino.Geometry.Vector3d(5,0,0)
new_curves.pop(0)
rs.MoveObjects(new_curves, trans)
orient_curves()
```