How to add Landing property to a leader

Hi all,

Is there any way to add “landing” property to a Leader created within a code with scripting?

I am using a code;

pts.extend([pick_pt, point2])
leader = rs.AddLeader(pts, text=layerName)
rs.ObjectLayer(leader, layer)
rs.ObjectColor(leader, (170,5,5))
rs.ObjectPrintWidth(leader, 0.2)

Thanks in advance…

The full code is on attachment (1.7 KB)

Hi @yigit, not with plain RhinoScriptSyntax, but you can use some RhinoCommon in Python to do it inside your script eg:

    leader_id = rs.AddLeader(pts, text=layerName)  
    # change landing
    leader_obj = rs.coercerhinoobject(leader_id, True, True)
    leader_obj.Geometry.LeaderHasLanding = True
    leader_obj.Geometry.LeaderLandingLength = 1.0

@dale, please have a look at below attached script. I’ve tried to create the leader using RhinoCommon and found that i cannot set LeaderHasLanding and LeaderLandingLength before adding the leader object to the document. There seems to be something i do not get while setting both properties or they are forced to be read from the current dimstyle. (Note, the script is supposed to work on named objects picked in a layout/detail view). (2.8 KB)


1 Like

Thank you !! :grin: