draw line continuously
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello, good luck for you everyone.
I am making a lsp of that draw line continuously.
first, start point and then click for direction, and then input line length
but it so difficult and help.
(defun c:lin (/ p1 p2)
(defun rtd (a) (* 180.0 (/ a pi)))
(if (= dirang nil)(setq dirang 0))
(if (= dirlen nil)(setq dirlen 0))
(setq p1 (getpoint (strcat "\nstart point :")))
(while
(if (/= p1 nil)
(setq p2 (getpoint (getvar "lastpoint") "\npoint for direction :"))
)
(setq dirlens-x (getdist (strcat "\nline length : ")))
(if (numberp dirlens-x)(setq dirlen dirlens-x))
(if (/= p2 nil)
(setq ang (angle (getvar "lastpoint") p2)
dirang (rtd ang)
)
)
(command "line" p1 (strcat "@" (rtos dirlen 2 1) "<" (rtos dirang)))
)
(princ)
)
attached file. I want to make like this.