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: 42.4 visits/day | Last visit: 39 mins ago
Popularity: 31 visits/day | Last visit: 23 mins ago
Popularity: 21.9 visits/day | Last visit: 22 mins ago
Popularity: 17.7 visits/day | Last visit: 22 mins ago
Popularity: 17.6 visits/day | Last visit: 43 mins ago
Popularity: 47.3 visits/day | Last visit: 1 hour ago
Popularity: 25.8 visits/day | Last visit: 1 hour ago
Popularity: 18 visits/day | Last visit: 56 mins ago
Popularity: 5.6 visits/day | Last visit: 12 mins ago
Popularity: 7.7 visits/day | Last visit: 1 hour ago
Popularity: 3.5 visits/day | Last visit: 5 hours ago
Popularity: 10.9 visits/day | Last visit: 50 mins ago
Tip of the Day
To get the full path, you append the DWGPREFIX system variable (which stores the path) to the DWGNAME system variable (which stores the file name). Use code such as the following example to retrieve and assign the values of DWGNAME and DWGPREFIX to variables in AutoLISP :
(setq DN (getvar "DWGNAME")) (setq DP (getvar "DWGPREFIX"))
Use the AutoLISP function (strcat) to concatenate the results and assign them to a variable, for example :
(setq TM (strcat DP DN))
In this example, the variable TM contains the full path including the file name.
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.