Leaders with rhinocommon (RH5)

Hi,
I’ve got three questions regarding leaders with rhinocommon (RH5):

  • How do I draw a leader from a display conduit? I was looking for a e.Display.DrawLeader() but it doesn’t seems to exist.

  • Is there some kind of internal object that can be used to pass a leader between two classes? (Such as the CurveObject class for curves)

  • I know how to create a leader in the model with RhinoDoc.ActiveDoc.Objects.AddLeader(), but how do I change the Leader style?

Thanks for your help.

Hi Matthieu, i guess you need to draw all elements individually, line or polyline, arrowhead and text. You could use one of these:

e.Display.DrawArrow
e.Display.DrawArrowHead

_
c.

Thanks @clement, I’ll use this for now in the displayPipeline.

I also solved my second question by creating a LeaderObject structure

The only thing left is how do we manage leaders styles from RhinoCommon? Or even better, how could I use the leader property overrides to bypass the current style?
This is the override from rhino UI, I’d like to changes these from the code:
image

I think you can read some of the things out using the Leader properties, eg. Font, Text height, Arrow length and try to use these in your conduit. Properties like Arrow style are going to be hard.

Btw. If you have an existing leader already in the document, you may also circument above and just use DrawObject.

_
c.

Thanks @clement, this is not what I hoped but I managed to workaround this