Extract the mid point of multiple open curves as a point

Hi, and thanks for help, is there any python script to extract the mid point of multiple open curves as a point?
by multiple curves I mean as a single command, tried this but it gives an error:

import rhinoscriptsyntax as rs
object = rs.GetObject(“Select a curve”)
if rs.IsCurve(object):
point = rs.CurveMidPoint(pbject)
rs.AddPoint( point )

You need a loop. Loop through the multiple selected curves and place a point at each midpoint.

import rhinoscriptsyntax as rs
objs=rs.GetObjects("Select open curves to place midpoint", rs.filter.curve)
if objs:
    for obj in objs:
        rs.AddPoint(rs.CurveMidPoint(obj))
1 Like

Worked! Thanks!