Jump to content

Recommended Posts

Posted

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).example.jpg

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

Posted

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)
)

Posted

Hi Tharwat,

 

This is just perfect.8)

 

Thanks a lot,

 

Cheers,

 

NicoV

Posted
Hi Tharwat,

 

This is just perfect.8)

 

Thanks a lot,

 

Cheers,

 

NicoV

 

You're welcome anytime NicoV . :)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...