Want to extract the coordinate of “plane origin” of bunch of leaders and drop a point there using python script.
element  of GetObjectsEx seems to give me a point on somewhere on the leader - and only seems to work on some of them - so not quite what i want…
Any help is apprciated - thanks!!!
Hi @yishida, you might try below script:
import rhinoscriptsyntax as rs
def leader_filter(rhino_object, geometry, component_index):
if isinstance(rhino_object, Rhino.DocObjects.LeaderObject):
msg = "Select leaders to extract tip points"
ids = rs.GetObjects(msg, 512, True, True, custom_filter = leader_filter)
if not ids: return
for id in ids:
rh_obj = rs.coercerhinoobject(id, True, True)
leader_tip = rh_obj.Geometry.Plane.Origin