Nebulae Posted January 21, 2022 Posted January 21, 2022 On 6/21/2018 at 9:56 PM, hanhphuc said: 1.If the Mtext is associative to Leader's end, just move it or modify x-coordinates properties. 2.lisp: same method from my previous code, by subsituting middle point (cadr p) now just modify the end point (last p) (defun c:test ( / s e p i a ) (if [color="red"](and (setq x (getpoint "\nPick side to extend "))[/color] (setq s (ssget ":L" '((0 . "LEADER") (-4 . "&=") (76 . 3)))) [color="red"])[/color] ... ... ... (apply 'append [color="red"] (subst (cons (car x) (cdr (last p))) (last p) p )[/color] ) ... ... p/s: if you've learned then you can combine all 3 in 1 Thanks mate, your code work like a charm for me. But it only do with leader has 3 points, can you modify it working with 2 points ?. I has been struggled with leader, is there any code to extend leader (second vertex point or last vertex point, landing in a point) like extend a normal line by choosing an edge Quote
exceed Posted January 25, 2022 Posted January 25, 2022 (defun c:test ( / s e p i a ) (if (and (setq x (getpoint "\nPick side to extend ")) (setq s (ssget ":L" '((0 . "LEADER") (-4 . "&=") (76 . 3)))) ) (repeat (setq i (sslength s)) (setq e (ssname s (setq i (1- i))) p (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= 10 (car x))) (entget e))) a (angle (car p) (cadr p)) ) (vlax-put (vlax-ename->vla-object e) 'coordinates (apply 'append ;(subst (cons (car x) (cdr (last p))) (subst (cons (car x) (cdr (cadr p)) ) (cadr p);(last p) p ) ) ) ) (princ "\nNothing?") ) (princ) ) maybe you edit (assoc 75) value 0 to 1 (hook flag) 1 Quote
Ajmal Posted June 1, 2022 Posted June 1, 2022 how can I make all the leaders to only 90° ,180°, 270° ,360° (Points to points only orthomode, like 90°,180°,270°,360°) as attached drawing TEST.dwg Quote
exceed Posted June 2, 2022 Posted June 2, 2022 11 hours ago, Ajmal said: how can I make all the leaders to only 90° ,180°, 270° ,360° (Points to points only orthomode, like 90°,180°,270°,360°) as attached drawing TEST.dwg 78.91 kB · 2 downloads Your code takes the first point of an existing leader and creates a three-point leader using the underlined start and underlined end of the text. To make this perpendicular, you would fix the first and third points and move the second point toward the right angle. Since there can be two points that are perpendicular when two points are fixed, (rectangle) You need to find a right angle point located on the extension line from the previously calculated second point. Quote
Medhat93 Posted May 18, 2023 Posted May 18, 2023 Are there any modifications to the final agreed lisp to be suitable with multileaders not quick leader Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.