Jump to content

Lisp help (trans)


VisDak

Recommended Posts

Hi all

 

Good day, could any one help me regarding with wcs trans in this lsp

im trying to add the trans but its not working on propered direction

 

(defun c:ql  (/ oldorth pt grdat cAng cDis pt1)
 (setq oldorth (getvar "ORTHOMODE"))
 (if (setq pt (getpoint "\nSelect First Point: "))
   (progn
     (while (eq 5 (car (setq grdat (grread t 5 0))))
       (redraw)
       (setq cAng (angle pt (setq cPt (cadr grdat)))
             cDis (distance pt cPt))
       (cond ((<= 0 cAng (/ pi 2))
              (setq pt1 (polar pt (/ pi 3) cDis)))
             ((< (/ pi 2) cAng pi)
              (setq pt1 (polar pt (/ (* 2 pi) 3) cDis)))
             ((<= pi cAng (/ (* 3 pi) 2))
              (setq pt1 (polar pt (/ (* 4 pi) 3) cDis)))
             ((< (/ (* 3 pi) 2) cAng (* 2 pi))
              (setq pt1 (polar pt (/ (* 5 pi) 3) cDis))))
       (grvecs (list 5 pt pt1)))
     (setvar "ORTHOMODE" 1)
 ; Thanks VovKa 
     (entmake (list (cons 0 "LEADER")
                    (cons 100 "AcDbEntity")
                    (cons 100 "AcDbLeader")
                    (cons 71 1)
                    (cons 72 0)
                    (cons 73 3)
                    (cons 74 0)
                    (cons 75 0)
                    (cons 10 [color=red](trans pt 1 0))
[/color]                     (cons 10 [color=red](trans pt1 1 0))[/color]
                    (cons 10 (getpoint pt1 "\nSpecify Next Point"))
                    (list -3
                          (list "ACAD"
                                (cons 1000 "DSTYLE")
                                (cons 1002 "{")
                                (cons 1070 41)
                                (cons 1040 2.5)
                                (cons 1002 "}")))))
     (redraw)))
 (setvar "ORTHOMODE" oldorth)
 (princ))

 

thanks,

Link to comment
Share on other sites

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