AutoLISP is a programming language specifically designed for use with AutoCAD, a popular computer-aided design (CAD) software. AutoLISP provides a wide range of functions for manipulating AutoCAD drawings and performing various tasks. While I can’t provide an exhaustive list of all AutoLISP functions (as they may change or be extended over time), I can give you an overview of some common functions and categories you’ll find in AutoLISP:
- Geometry Functions:
- `setq` — Set a variable.
- `getvar` — Retrieve the value of a system variable.
- `setvar` — Set the value of a system variable.
- `entget` — Retrieve the properties of an AutoCAD entity.
- `entmod` — Modify the properties of an AutoCAD entity.
2. Mathematical Functions:
— `+`, `-`, `*`, `/` — Basic arithmetic operations.
— `sin`, `cos`, `tan` — Trigonometric functions.
— `sqrt`, `exp`, `log` — Mathematical functions.
3. Conditional and Control Flow:
— `if` — Conditional statement.
— `cond` — Multiple condition evaluation.
— `while` — Looping construct.
— `foreach` — Iterate over a list.
4. List Handling Functions:
— `list`, `cons`, `car`, `cdr` — List manipulation functions.
Get Khan Mohammad Hekmat’s stories in your inbox
Join Medium for free to get updates from this writer.
— `append`, `reverse`, `nth`, `assoc` — More list operations.
5. User Input and Output:
— `getstring` — Prompt for a user input string.
— `princ`, `princ-to` — Display text in the AutoCAD command line.
6. File Handling Functions:
— `open`, `read-line`, `write-line` — File I/O functions.
— `close` — Close a file.
7. Error Handling Functions:
— `error` — Raise an error.
— `cerror` — Handle a condition and continue.
8. Utility Functions:
— `vlax-ename->vla-object` — Convert an entity name to a VLA object.
— `vlax-curve-getclosestpointto` — Find the closest point on a curve.
— `vla-get` and `vla-put` — Access and modify AutoCAD object properties using Visual LISP.
9. Dialog Box Functions:
— `dcl_idlist`, `dcl_init`, `dcl_done` — Functions for creating and managing DCL (Dialog Control Language) dialog boxes.
10. External Application Interaction:
— `vl-load-com` — Load and interact with COM (Component Object Model) objects.
— `vl-arx-import` — Import AutoCAD ARX applications.
The availability of functions and their behavior may vary depending on the version of AutoCAD and AutoLISP you are using. You can refer to the AutoLISP documentation specific to your AutoCAD version for a comprehensive and up-to-date list of functions and their descriptions.










