in other post, i found this lisp, but i only need same angle, no need same height, but i don't know how to change this lisp, anyone can help me, pls
and i need to change is LEADER, not multileader, i only need to arrange leader angle , no need same height, anyone can help me
Code:
---------
(defun c:foo (/ _pts a d e el epts i mp n o p p2 s x y)
;; RJP 03.27.2018
;; Aligns 'old school' 3 pt leaders matching angle of leader and fixes offset distance of horizontal landings
;; ***The bottom most leader is the one matched***
;; Far from perfect, but better than doing it manually
(defun _pts (e)
(mapcar 'cdr
(vl-remove-if-not '(lambda (x) (= 10 (car x))) (entget e))
)
)
(cond
((and (setq s (ssget ":L" '((0 . "leader"))))
(setq
s (vl-sort
(mapcar '(lambda (x) (append (list x) (_pts x)))
(vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
)
'(lambda (a b) (< (cadr (last a)) (cadr (last b))))
)
)
(setq d (/ (distance (last (car s)) (last (last s))) (length s)))
(or (setq
i (getdist
(strcat "\nEnter spacing for horizontal leader[<"
(vl-princ-to-string d)
">]: "
)
)
)
(setq i d)
)
(setq e (car s))
(setq s (cdr s))
)
(setq a (angle (car (setq epts (cdr e))) (cadr epts)))
(setq y (last epts))
(setq n 1)
(foreach l s
(setq o (vlax-ename->vla-object (car l)))
(setq p (cdr l))
(cond ((setq mp
(inters (car p)
(polar (car p) a 1e-2)
(setq p2 (list (car y) (+ (* n i) (cadr y)) 0.0))
(polar p2 0.0 1e-2)
nil
)
)
(vlax-put o
'coordinates
(apply 'append (list (car p) mp p2))
)
(setq n (1+ n))
)
)
)
)
)
(princ)
)