Mode:
Duration:
1
2
3
4
5
6
(defun c:DrawRectangle ()
(setq p1 (getpoint "\nFirst corner: "))
(setq p2 (getpoint "\nOpposite corner: "))
(command "_.RECTANGLE" p1 p2)
(princ)
)Coding works best on desktop or with an external keyboard.
(defun c:DrawRectangle ()
(setq p1 (getpoint "\nFirst corner: "))
(setq p2 (getpoint "\nOpposite corner: "))
(command "_.RECTANGLE" p1 p2)
(princ)
)Coding works best on desktop or with an external keyboard.
Prompts user for two corners and draws a rectangle.
(defun c:DrawRectangle ()
(setq p1 (getpoint "\nFirst corner: "))
(setq p2 (getpoint "\nOpposite corner: "))
(command "_.RECTANGLE" p1 p2)
(princ)
)AutoLISP is a dialect of the Lisp programming language built specifically for automating tasks, customizing workflows, and extending functionality within Autodesk AutoCAD software, enabling rapid development of scripts and commands to enhance CAD productivity.
Origin & Creator
Developed by Autodesk Inc., USA, as an extension of the Lisp programming language for CAD automation.
Industrial Note
Commonly used in AEC (Architecture, Engineering, Construction), mechanical design, civil engineering workflows, and production drafting where repetitive AutoCAD operations need automation.