
(prompt "This line will print") This is a commentįrom where the semicolon begins, the remainder of the line is a comment statement. A semicolon does not have to begin the line.

Write notes about your program, what you are doing and what the variables are. It is used for documentation and explanation of your program. When you begin a line with a semicolon, anything you write after will be ignored by AutoLisp. Structure your program in such a way that it is easy to understand, by yourself and everyone else.

Therefore a variable can store just about anything. In AutoLisp, variables may be a collection of letters or numbers as long as they begin with the letters.Įxample of legal variables are as follows:Īn AutoLisp variable may contain more than one value in a single variable. These are like empty boxes in which to store data, to be used later. Is a pre-defined set of instructions that describes a set of actions that AutoLisp is to perform, divided into three sections:ĭraw out or write out in English what you want your program to do. Use a simple text processor such as Notepad to create and edit your lisp files.

Hope this helps you and Good Luck in your Lisping - Kenny Ramage Principles of ProgrammingĪll AutoLisp programs must contain the suffix ".LSP" otherwise AutoCAD will not access them when loading. You can then lookup the relevant AutoLisp commands for a more detailed explanation. I suggest that you go through this tutorial along with the AutoCAD Programmers Reference Guide. This tutorial is aimed at the AutoCAD users who would like to start learning AutoLisp.
