Created
May 31, 2025 07:53
-
-
Save Apihplays/b40545660364ee9492a9b9b2a3c62407 to your computer and use it in GitHub Desktop.
Autocad LISP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun c:draw15line ( / pt pt2) | |
(setq pt (getpoint "\nSpecify start point: ")) ; Prompt to specify the first point | |
(command "LINE" pt) ; Start the line at the first point | |
(while t ; Loop to keep drawing lines incrementally | |
(setq pt2 (polar pt (angle pt (getpoint "\nPick next point: ")) 10)) ; Calculate the next point 10 meters away from the start point | |
(command pt2) ; Draw the line to the new point | |
(setq pt pt2) ; Update the start point for the next line to be the endpoint of the current line | |
(princ) ; Keep the loop running for continuous lines | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment