Showing posts with label length. Show all posts
Showing posts with label length. Show all posts

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