If you are working in a team that use several of the same lisp functions, a good idea is to place acad.lsp and acaddoc.lsp in some networked location, and add that location to you list of support paths. Support paths higher on the list will be searched before lower ones. If there are many, AutoCAD® will load the first one that it finds in the order specified in your support paths. In the beginning, I assumed you could have many of these files in multiple support paths, but AutoCAD® will only load one. The location of where to save acad.lsp or acaddoc.lsp depends on what you want to achieve, but it will only be loaded if it is found in one of your support paths, as specified in Options > Files > Support File Search Path. Again, the arguments passed to it will have to correspond with how you’d enter them into the command line normally. For those learning lisp, the”setvar” lisp command tells AutoCAD® to set the value of a system variable (pretty obvious really!). set linetypes to be continuous on polylines suppress “Would you like to convert to a polyline prompt” Annoyingly they are drawing specific, but using acaddoc.lsp we can set them to whatever we want when the drawing is opened: For example, I have a few system variables that I like to be set a certain way. Therefore this is the perfect place to do anything that is specific to the drawing you are working on. In fact this lisp file is run every time a document is opened. So how does acaddoc.lsp differ? As the name suggests, this has something to do with documents. The text provided in quotes will be executed as if you had entered them into the AutoCAD® command line. And acad.lsp is a great place to run these commands, like so:įor those new to lisp, the lisp command at work here is “command”, which basically allows you to invoke any AutoCAD® command from lisp. The solution for me was to use the UNDEFINE command to remove the default commands from AutoCAD®, which would then allow my own customisations in acad.pgp to take priority. The problem is, these are existing built in commands to AutoCAD®. For example, I have mapped commands to various key combinations under my left hand, including SS, DD and DA. Because of this it is a great place to put startup procedures, or things that you want to do to initialise AutoCAD®. acad.lspįirstly, acad.lsp is by default executed when AutoCAD® first boots up. These two lisp files are automatically executed when certain conditions occur in AutoCAD. Lisp is a very useful part of the AutoCAD® application, and one of the first things its good for you to know is how acad.lsp and acaddoc.lsp work.