Multi leaders using Lisp with single line and multi arrow

Multi leaders using Lisp with single line and multi arrow

Amriya_Exe
Advocate Advocate
411 Views
4 Replies
Message 1 of 5

Multi leaders using Lisp with single line and multi arrow

Amriya_Exe
Advocate
Advocate

How to draw this type of Multi leaders manually?

Amriya_Exe_0-1753695896850.png

 

Also I have coordinates for this red circle points where arrow start Please give me Lisp codes all points are not fixed will random numbers of but text position and text will be fixed at start point/end point.

all 3 type of leaders via lisp.

 

0 Likes
412 Views
4 Replies
Replies (4)
Message 2 of 5

ВeekeeCZ
Consultant
Consultant

Manual solution.

 

Set the Maximum leader points to at least 3. But still, leader lines would be overlapping. But it's one entity.

 

eekeeCZ_0-1753700992839.png

 

eekeeCZ_1-1753701050058.png

 

0 Likes
Message 3 of 5

Amriya_Exe
Advocate
Advocate

I made two point leader without content.

(if (tblsearch "MLSTYLE" "dp-CIJ")
    (command "_.MLEADER" "_non" midInsertPt "_non" reducedPt "")
    (command "_.PLINE" "_non" midInsertPt "_non" reducedPt "")
)

Tried this code but its not working..
after that in lisp I made leader line and connecting line separately

 

(setq i 0)
(while (< i (length midPts))
  (setq arrowInsertPt (nth i midPts))  ; Midpoint

  ;; Insert ArrowHead block at 0 rotation
  (vla-InsertBlock
    ms
    (vlax-3d-point arrowInsertPt)
    "ArrowHead"
    1.0 1.0 1.0
    0.0
  )
  (setq i (1+ i))
)

 

This code for insert arrow at this connecter points.. 
i am not able to find correct way to calculate angle so that block can inserted right way.
I tried to use fixed rotated block but it is not working for all segments in long curve. 

 

0 Likes
Message 4 of 5

scot-65
Advisor
Advisor

Looks like a Dynamic Block with linear stretch (landing), polar stretch (arrowheads), flip, and attributes would work.

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 5 of 5

Sea-Haven
Mentor
Mentor

Why not stick with making a leader, if your picking points on a pline or have points you can get the angle of the pline at a point, so then add say 45 and an offset distance, and final point. You talk about a curve need more examples. The angle returned could be used inconjunction with your insert block arrow.

 

(defun alg-ang (obj pnt)
  (angle '(0. 0. 0.)
     (vlax-curve-getfirstderiv
       obj
       (vlax-curve-getparamatpoint
         obj
         pnt
       )
     )
  )
)

 

0 Likes