Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I need a lisp routine to draw ray lines and that should draw multiple ray lines with separate start point where I click until I press Escape key. I have a code as follows. But it takes same start point for each click. Can some help me to modify this routine.
(defun c:RayLoop (/ pt1 pt2)
(while (setq pt1 (getpoint "\nSelect the start point for the ray: ")) ; Continue until the user cancels
(setq pt2 (getpoint pt1 "\nSelect the direction point for the ray: ")) ; Get the direction point
(if pt2
(command "ray" pt1 pt2) ; Execute the ray command
)
)
(princ "\nRay loop ended.")
(princ)
)
Solved! Go to Solution.