NicoV Posted March 19, 2013 Posted March 19, 2013 Hi Everyone, I'm new over here, so sorry if this is the wrong place. i was wondering if someone could point me to right direction of a Lisp witch can create a spline in the current layer with a arrow on both sides of the spline (see example attached). Untill now i created it always with a leader and added manualy a second arrow at the other side of the spline, but i have to do this so often that i am looking for a lisp that can do this. anyone any idea ? Thanks in advance Cheers, NicoV Quote
Tharwat Posted March 19, 2013 Posted March 19, 2013 Welcome to CadTutor Would this be of any assistance ? (defun c:Test (/ s e st nd le ds) ;;; Tharwat 19. 03. 2013 ;;; (if (and (setq s (car (entsel "\n Select spline :"))) (eq (cdr (assoc 0 (setq e (entget s)))) "SPLINE") ) (progn (setq st (cdr (assoc 10 e)) nd (cdr (assoc 11 (reverse e))) le (vlax-curve-getdistatpoint s nd) ds (/ le 50.) ) (entmakex (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") '(90 . 2) '(70 . 0) (cons 10 st) '(40 . 0.0) (cons 41 ds) '(42 . 0.0) (cons 10 (vlax-curve-getpointatdist s ds)) (cons 40 ds) (cons 41 ds) '(42 . 0.0) (assoc 8 e) ) ) (entmakex (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") '(90 . 2) '(70 . 0) (cons 10 nd) '(40 . 0.0) (cons 41 ds) '(42 . 0.0) (cons 10 (vlax-curve-getpointatdist s (- le ds))) (cons 40 ds) (cons 41 ds) '(42 . 0.0) (assoc 8 e) ) ) ) ) (princ) ) Quote
NicoV Posted March 20, 2013 Author Posted March 20, 2013 Hi Tharwat, This is just perfect. Thanks a lot, Cheers, NicoV Quote
Tharwat Posted March 20, 2013 Posted March 20, 2013 Hi Tharwat, This is just perfect. Thanks a lot, Cheers, NicoV You're welcome anytime NicoV . 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.