Message 1 of 4

Not applicable
05-20-2017
10:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to create a lisp routine that will get co-ordinates from a user's input. These will be stored as a list and a Polyline will be drawn through the list co-ordinates. also, I want to obtain the individual lengths of the Polyline.
I have started a basic routine but understand that the coding is probably really amateurish. Any help would be greatly appreciated, thanks in advanced.
(defun c:X ()
(while
(setq pt (getpoint))
(setq ptlist (append ptlist (list pt)))
)
(while
(setq dist (distance (car ptlist) (cadr ptlist))
(setq distlist (append distlist (list dist)))
(setq ptlist (vl-remove (nth 0 ptlist) ptlist))
)
(princ)
)
Solved! Go to Solution.