Can leader be dynamically drawn?

After providing the first point I would like to see where the leader will go and see on which side the text will go. Getting flipped, moving right to left as the mouse moves.

Is this possible?

Hi @ivelin.peychev,

you might try below script for a starting point. It displays the leader text dynamically and when Enter is pressed you should get the text on the side which has been displayed before the last picked point. Note that leaders are based on the active CPlane, don’t switch views while picking the leader points with below example… (2.1 KB)



Thanks @clement :bowing_man:


Do you know by any chance how to make the text Underlined?

I mean this:

not this:

Hi Ivelin,

Valignment = Rhino.DocObjects.TextVerticalAlignment.BottomOfBoundingBox
leader.LeaderTextVerticalAlignment = Valignment 
1 Like

Awesome, thanks @djordje

I was looking for “Underlined” in the API :roll_eyes:

1 Like

The leader is created using CreateWithRichText method. One way to make all or parts of the leader text underlined (I know you want to align it) is to use rich text formating, eg. replace this:

leader_text = "Hello World"

with something like this to test it out:

leader_text = "{\\rtf1 this is \\ul underlined Hello World \\ul0 text }"

@dale, if you have time to read this, does Rhino 6 offer a dialog which allows to change rich text ? I mean something like Dialogs.ShowEditBox method but with all the funny font controls.


@Alain, is this something you can help with?


Another way to make the whole string underline is by calling leader.SetUnderline(True)

I don’t think there’s a build in dialog to just help you create rich text.


1 Like