Learn AutoLISP for AutoCAD productivity
What is AutoLISP?
AutoLISP is a programming language designed specifically for use with the full version of AutoCAD (i.e. it does not work with AutoCAD LT). AutoLISP is one of a number of Application Programming Interfaces (APIs) built into AutoCAD but it is probably the easiest to use and therefore the most productive for the beginner. If you'd like to learn how to use AutoLISP to improve productivity, you're in the right place.
AfraLISP will help you get to grips with AutoLISP as quickly and easily as possible using some great tutorials for beginners. But the site also contains many intermediate and advanced AutoLISP tutorials to take you much further than the basics. In addition, AfraLISP provides DCL Tutorials (Dialog Control Language), Visual LISP tutorials, VBA Tutorials and AutoCAD customization tutorials in case you'd like to take your AutoLISP and AutoCAD programming to the next level.
Beginners Start Here
Popularity: 43.1 visits/day | Last visit: 28 mins ago
Popularity: 31.5 visits/day | Last visit: 16 mins ago
Popularity: 22.2 visits/day | Last visit: 25 mins ago
Popularity: 18 visits/day | Last visit: <1 minute ago
Popularity: 18.4 visits/day | Last visit: <1 minute ago
Popularity: 50.3 visits/day | Last visit: 19 mins ago
Popularity: 9.8 visits/day | Last visit: 5 hours ago
Popularity: 7.9 visits/day | Last visit: 1 hour ago
Popularity: 11.2 visits/day | Last visit: 14 mins ago
Popularity: 3.7 visits/day | Last visit: 8 hours ago
Popularity: 9.2 visits/day | Last visit: 1 hour ago
Popularity: 6.2 visits/day | Last visit: 13 mins ago
Tip of the Day
The following will give you a list of all entries in a symbol table. This is great for creating a list to populate a list box in DCL.
;;;Start Coding Here (defun tablelist (s / d r) (while (setq d (tblnext s (null d))) (setq r (cons (cdr (assoc 2 d)) r)) );while );defun ;;;End Coding Here
For example, if you would like a list of all layers in a specific drawing, use this :
(setq all_layers (tablelist "LAYER"))
AutoLisp should return something like this :
("7" "6" "5" "4" "3" "2" "0")
To populate a list box with the key of "selections," use this :
(start_list "selections") (mapcar 'add_list all_layers)
Missed a Tip?
Did you miss yesterday's tip? Maybe you forgot to drop by or maybe you didn't visit over the weekend. If so, you can now see all the tips published during the past week.