Message 1 of 24
LISP code does not work in the Russian version of AutoCAD, letters are not displayed correctly in the editor.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
https://www.youtube.com/watch?v=g1pEGcQaYYw
(defun c:A4 ()
(command "RECTANG" "0,0" "297,210")
)
https://www.youtube.com/watch?v=AW7RXho38_I
(defun C:HEXAGON (/ center radius angle p1)
(setq center (getpoint "\nSpecify center point: "))
(setq radius (getdist center "\nSpecify radius: "))
(setq angle (/ pi 3)); 60 degrees in radians
;; Create 6 points for the hexagon
(setq p1 (polar center (* 0 angle) radius))
(command "pline" p1)
(repeat 6
(setq p1 (polar center (* angle 1.0) radius))
(command p1)
(setq angle (+ angle (/ pi 3)))
)
(command "close")
(princ "\nHexagon created successfully.")
(princ)
)