Saturday, August 30, 2008

LINE of given length and direction

This small routine will draw a LINE of given length in a given direction.

Sequence of command lines for this routine:-

Command: LLD
Pick Start point :
Show direction or Enter angle :
Enter distance :


;CODING STARTS HERE
(prompt "\nType LLD to run....")

(defun C:LLD (/ pt1 ang1 dis1 pt2)
(setq pt1 (getpoint "\nPick Start point :"))
(setq ang1 (getangle pt1 "\nShow direction or Enter angle : "))
(setq dis1 (getdist "\nEnter distance : "))
(setq pt2 (polar pt1 ang1 dis1))
(command "line" pt1 pt2 "")
(princ)
)
;CODING ENDS HERE


Save this as "LLD.lsp".

2 comments:

  1. Thanks for reading my blog.
    I will also be in touch with your AutoCad blog.
    Also will like to read Urdu Shers in Devnagri sript

    -Avinash

    ReplyDelete
  2. Welcome Avinash.
    But where's your blog? I could'nt able to find its URL.

    ReplyDelete