The fundamental rule of AutoLISP is that every statement must be enclosed in parentheses. This structure is known as an S-expression (symbolic expression).
: Common types include integers, real numbers (decimals), strings (text), and lists. Lists are the heart of the language and can store anything from a simple set of coordinates to complex drawing data. AutoLISP in AutoCAD
: Functions like getpoint , getreal , and getstring pause the routine to ask the user for specific data. The fundamental rule of AutoLISP is that every
: To create a custom command that can be typed into the AutoCAD command line, use the defun function with a C: prefix. For instance, (defun C:HELLO () (prompt "\nHello World!")) defines a new command called HELLO . Lists are the heart of the language and
: Use the setq function to assign a value to a variable, such as (setq myWidth 10.5) . Essential Functions for Automation
: In AutoLISP, the function name always comes first, followed by its arguments. For example, to add two numbers, you write (+ 1 2) instead of 1 + 2 .
: Use ssget to pick multiple objects based on criteria (like layer or color), allowing you to modify hundreds of items at once.