Siddu Posted September 15, 2020 Posted September 15, 2020 (edited) Dear all, I have multiple Polylines parallel to each other in Cad and I Need to convert those into Arrows or Leaders (without Text) any Lisp available? Really appreciate for assistance. Thanks, Siddu Edited September 15, 2020 by Siddu Quote
dlanorh Posted September 15, 2020 Posted September 15, 2020 Rather a vague desciption. Post a Before/After drawing (saved as AutoCAD 2012 or earlier for me) so everyone is on the same page. Quote
ronjonp Posted September 15, 2020 Posted September 15, 2020 Perhaps something as simple as this? (defun c:foo (/ r s) ;; RJP » 2020-09-15 (if (setq s (ssget ":L" '((0 . "lwpolyline,line")))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (setq r nil) (foreach i (reverse (entget e)) (if (member (car i) '(10 11)) (setq r (cons (cons 10 (cdr i)) r)) ) ) (and (entmake (append (list '(0 . "LEADER") '(100 . "AcDbEntity") (assoc 8 (entget e)) '(100 . "AcDbLeader") '(3 . "STANDARD") ) r ) ) (entdel e) ) ) ) (princ) ) 1 Quote
BIGAL Posted September 15, 2020 Posted September 15, 2020 Any thing wrong with a linetype ? Will have multi arrows, can make different linetype with spacing to suit. Quote
Siddu Posted September 16, 2020 Author Posted September 16, 2020 19 hours ago, ronjonp said: Perhaps something as simple as this? (defun c:foo (/ r s) ;; RJP » 2020-09-15 (if (setq s (ssget ":L" '((0 . "lwpolyline,line")))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (setq r nil) (foreach i (reverse (entget e)) (if (member (car i) '(10 11)) (setq r (cons (cons 10 (cdr i)) r)) ) ) (and (entmake (append (list '(0 . "LEADER") '(100 . "AcDbEntity") (assoc 8 (entget e)) '(100 . "AcDbLeader") '(3 . "STANDARD") ) r ) ) (entdel e) ) ) ) (princ) ) @ronjonp Its working!! Thank you!! Quote
ronjonp Posted September 17, 2020 Posted September 17, 2020 23 hours ago, Siddu said: @ronjonp Its working!! Thank you!! Glad to help 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.