Learning Autolisp or Visual Lisp

To find help on lisp, you'll want to pull up the visual lisp editor.

Tools>AutoLisp>Visual LISP editor, or type VLIDE at the command line

This Visual Lisp Integrated Development Environment is a dedicated editor that contains utilities for writing and debugging lisp code.

The Help in this interface provides help on lisp as opposed to the help in Autocad

Examples of Lisp Expressions

Custom Built Commands

;somemacros.lsp
(setq x 85)
(setq wilma (/ 625 2.0))
(defun half (x)(/ x 2.0))
(half 625.0);this was an example
(defun c:v ()(command "3dforbit"))
(defun c:3 ()(command "ucs" "3"))
(defun c:a ()(command "zoom" "p"))

(defun c:cs ();make circumscribed hexagon 
  (setq point (getpoint "\n Enter Start point:"))
  (setq diameter (getreal "\n please enter diameter:"))
  (command "polygon" 6 point "c" (/ diameter 2.0))
 )
(defun c:csa ();make circumscribed octagon aimed by user 
  (setq point (getpoint "\n Enter Start point:"))
  (setq diameter (getreal "\n please enter diameter:"))
  (command "polygon" 8 point "c" (half diameter))
  (command "rotate" "last" "" point)

 );note - this requires the function half
;here is what a point looks like: (-17.942 24.3838 0.0)