Move MultiLeader Start Point

Move MultiLeader Start Point

DGCSCAD
Collaborator Collaborator
295 Views
2 Replies
Message 1 of 3

Move MultiLeader Start Point

DGCSCAD
Collaborator
Collaborator

Hi all,

I'm looking to change an existing MLeaders arrow start point. There's always only one arrowhead and one landing, so it's fairly simple, but I can't seem to find a solution. 

 

Any help is appreciated.

AutoCad 2018 (full)
Win 11 Pro
0 Likes
Accepted solutions (1)
296 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant
Accepted solution

Possibly like this...

 

(vl-load-com)

(defun c:MleaderHead ( / e p o c)
  (if (and (setq e (car (entsel "\nSelect Mleader: ")))
	   (setq p (getpoint "\nSpecify new headpoint: "))
	   (setq o (vlax-ename->vla-object e))
	   (setq c (vlax-safearray->list (vlax-variant-value (vla-getleaderlinevertices o 0))))
	   )
    (vla-SetLeaderLineVertices o 0 (vlax-safearray-fill (vlax-make-safearray vlax-vbDouble '(0 . 5)) (append (trans p 1 0) (cdddr c)))))
  (princ)
  )
0 Likes
Message 3 of 3

DGCSCAD
Collaborator
Collaborator

Thank you BeekeeCZ, that was it. 🙂

AutoCad 2018 (full)
Win 11 Pro
0 Likes