Siddu Posted September 15, 2020 Share 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 Link to comment Share on other sites More sharing options...
dlanorh Posted September 15, 2020 Share 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 Link to comment Share on other sites More sharing options...
ronjonp Posted September 15, 2020 Share 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 Link to comment Share on other sites More sharing options...
BIGAL Posted September 15, 2020 Share Posted September 15, 2020 Any thing wrong with a linetype ? Will have multi arrows, can make different linetype with spacing to suit. Quote Link to comment Share on other sites More sharing options...
Siddu Posted September 16, 2020 Author Share 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 Link to comment Share on other sites More sharing options...
ronjonp Posted September 17, 2020 Share Posted September 17, 2020 23 hours ago, Siddu said: @ronjonp Its working!! Thank you!! Glad to help Quote Link to comment Share on other sites More sharing options...
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.