Syntax can be defined as the rules that any kind of language uses. Those are the ATOMS that follow the Function call in the expression. The functions that AutoLISP uses are called…FUNCTIONS-that’s easy! And FUNCTIONS sometimes require ARGUMENTS. In fact, the interpreter is built into AutoCAD, so you can run expressions right from the Command Line.Īs for basic Terminology and Syntax, you should know that items within a list are ATOMS.
Autocad lisp routine code#
There’s no need to compile your code either. Note: One of the reasons AutoLISP is so easy for non-programmers (people like us) is that you don’t have to manage data types and memory allocation like other languages. Others include STRINGS, REAL numbers, and INTEGERS. AutoLISP considers a LIST or a CONS as a data type. Of course, there are various data types you’ll need to be familiar with. You’ll need to know about them, whether they’re defined as a LIST, a CONS, a DOTTED PAIR, or an S-EXPRESSION (or just EXPRESSION for short). Everything in the language is a list in some form. I think it’s important for any AutoLISP user to know what it is. Right now, we’ll start at the very beginning. This three-part series will help you become aware of the kinds of things you can do with AutoLISP at three levels of expertise: Beginner, Intermediate, and Advanced. It really doesn’t have to be, and even with just minimal knowledge, you can still accomplish a lot. You may not consider yourself a programmer, or it might just be intimidating. I just love AutoLISP, and I consider it my “home” language.īut I also understand that my love of the language isn’t universal. Architecture, Engineering and Construction.Architecture, Engineering & Construction.