See the length of a Leader in its properties

This could be a silly question. I'd like to be able to view the length of a Leader in its properties. I'm on v18 Pro and it's not listed in any of the groups. A Leader seems to be fairly similar in nature to a PLine, and all types of PLines have a Property called length. The reason I need this is because I'm drawing basic diagrams, similar to these:

The drawing is fairly rough/indicative, but I need to make sure the proportions are about right. All thoughts on the subject are welcome, but if I was to ask specific questions then they would be:
1. Does the Leader entity have a length like PLines do? If not, is there some reason for it inherent to the nature of a Leader?
2. Is there an alternative way to draw arrows and be able to see their length in Properties? My Leaders only ever have just two vertices.

Comments

  • Anthony Apostolaros
    edited April 2020

    When I do a properties and methods dump for a leader, I don't see the Length(RO) property that I see for a polyline. And I don't know of any way to alter what's shown in the Properties palette.

    But you could measure the length of the leader by using a cumulative distance command such as QDIST by Rodney Thomas, at: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cumulative-distance-command/td-p/1390358

    If you're sure the leaders will always have two segments, you could alter the command so that it accepts 3 points and then displays the cumulative distance without having to press Enter.

    If you want to see the cumulative length immediately after drawing the leader, you could alter Rodney's command so that it also passes the 3 points to the LEADER command. Then it'll draw the leader and display the length.

  • Thanks @Anthony Apostolaros,

    @Anthony Apostolaros said:
    If you're sure the leaders will always have two segments, you could alter the command so that it accepts 3 points and then displays the cumulative distance without having to press Enter.

    Just to be clear,

    @Mateusz Lawrynowicz said:
    My Leaders only ever have just two vertices.

    In case it makes my desires more achievable, I mean my leaders only have one segment (=two points).

    Other than that, I might be able to use your suggestion, but I really was hoping there was a simpler way to do this - I hope you don't mind me saying this.

    It does however give me the idea that I could use lisp to always draw an associated DIMALIGNED every time I draw a Leader. I had a quick look and couldn't find any existing tools to achieve this - are you aware of any? I've done a bit of LISP a few years ago but it would take me forever to brush up on it.

  • Why not create a dimension style with one suppressed arrow?

  • @Roy Klein Gebbinck said:
    Why not create a dimension style with one suppressed arrow?

    This sounds beautifully simple. I've now finished one batch of the drawings but will definitely try it out when I get another lot. Thanks!

  • Anthony Apostolaros
    edited April 2020

    In case that doesn't work, this will do the thing shown in your latest image post:
    (defun c:DO () (setq p1 (getpoint "start of arrow: ")) (setq p2 (getpoint p1 "end of arrow: ")) (command "leader" p2 p1 "" "" "none") (command "dimaligned" p1 p2) (while (> (getvar "cmdactive") 0) (command pause)) )

    And this will just draw the arrow and display its length in the command bar:
    (defun c:RO () (setq p1 (getpoint "start of arrow: ")) (setq p2 (getpoint p1 "end of arrow: ")) (command "leader" p2 p1 "" "" "none") (distance p1 p2) )

    If you set the "Coordinates" field of the status bar to "Relative" instead of "Absolute" (do that by right-clicking on it), it will display the length of either of those arrows while you're drawing it. And of course you can enter the length you want it to be while dragging it in the direction you want it to go in.