![autocad lisp tutorial autocad lisp tutorial](http://www.lee-mac.com/tutorials/debugvlide3.png)
Our getpoint function worked, but it didn't really tell the user what Inspect a variable, just precede the variable name with "!" User and store the value in variable "a". The statement we wrote earlier, told AutoLisp to get a point from the Same way as the REM statement in Basic is used. Semicolon is not evaluated by Autolisp and is treated as a comment, much the You can also add comments to your coding. Now you can see why "Lisp" is often known as "Lost in You could also write the above statement like this to make it more Here's an example : (dosomething (dosomethingelse (andanotherthing)))
![autocad lisp tutorial autocad lisp tutorial](https://www.tutorialspoint.com/lisp/images/lisp.jpg)
Just remember, that you must leave the nest with an equal number of This lets you write a function that evaluates another function. Means, in plain English : Get a point from the user and store the x, y and zĭid you notice how everything is enclosed within parenthesis?Īll AutoLisp functions are surrounded by parenthesis.Īs well, AutoLisp allows you to "nest" your functions. This list, believe it or not, contains the x, y and z coordinates of Then choose a point anywhere on the screen.Ī "list" of numbers, looking something like this, should appear Type this at the command prompt and press Well Done, you've just used AutoLisp to make AutoCAD do something.Īs you noticed using the (alert) function results in a dialogue box Fire up AutoCad and type this at the command prompt: (alert "Hello and welcome to AutoLISP!") Let's start up with something very simple and that will give you Programming without overwhelming you with double-gook. This tutorial will try and teach you the very basics of AutoLisp You've tried to decipher some AutoLisp routines but, you are still totally So, you've never programmed in AutoLisp before!