From the course: BIM Manager: Managing AutoCAD MEP & AutoCAD Civil 3D

What is acad.lsp?

From the course: BIM Manager: Managing AutoCAD MEP & AutoCAD Civil 3D

Start my 1-month free trial

What is acad.lsp?

- What LISP is, is basically an older programming tool that's still used to control the AutoCAD environment. The file we're going to look for is acad2017.lsp. LISP is sometimes known as "Lost In Stupid Parenthesis," which you're going to see why that is pretty soon. I'd like to find and check out an acad.lsp file, and tell AutoCAD when to automatically run it. To get started, let's jump into AutoCAD. Any flavor of AutoCAD will do. On the Start tab, under Get Started, let's just start a blank drawing. We're going to click on this big blue area here, and it will start a new drawing; excellent. Now what I'd like to do is, at the Command prompt, type in VLIDE and then hit Enter. That's the Visual LISP console. Now, what I'd like to do is find my acad2017.lsp file, so I'm going to click Open, I'm going to go to my (C:) drive, I'm going to go to Program Files, I'm going to go to Autodesk, I'm going to go to AutoCAD 2017, and I'm going to scroll down till I find Support. Once you find Support, go ahead and double click on that. Now, there's a couple LISP files, but the first one that shows up is AutoLISP Application source, acad2017. We can scroll over here and see that it's an AutoLISP application. I'm going to select acad2017, and I'm going to click Open. Now, what we're going to see is the Visual LISP window for AutoCAD. It used to be we'd have to edit these in a text editor. Now we have the full Visual LISP console that we can use. What we'll see here is that we have a Comment section. Any time you see a semicolon, that will comment out a field, which means that it won't read it once it's loaded in, and it's basically telling it, if it can't find one version to load this version. So essentially, it's looking for an AutoLISP routine, it doesn't find it, it's going to load acad2017.doc. And we have some encrypted signature down here. So what's going to happen is, this is going to load either once every session or once every time a user opens a drawing. Let's minimize this window. Now, what I'd like to do is go to my Options. The quickest way to do that is to type o, p and then just hit Enter. Now, the first tab it shows up on is Files. What I'd like to do is jump down to System. Under System, under Security Options, go ahead and click on Security Options. In the days of viruses, we now have Security Options based in AutoCAD, which is kind of a pain, but it's needed. What I'm interested is down at the very bottom: Automatic Loading; Choose the method to load acad.lsp. Once at the start of the session, or Load acad.lsp when opening each drawing. Now, I like to choose Load acad.lsp once at the start of the session. What we're going to do in the next video is make our own LISP file that we're going to load every time a user opens a drawing. You can uncheck one of these two so we're going to load acad.lsp once at the start of the session, and we'll see that, in the acad.lsp file, it runs a variable to load acad2017.lsp. I'm going to click OK, I want to click OK. Now, what will happen is, our Visual LISP console will still be open. If you hover over AutoCAD MEP, or whatever AutoCAD you have open, notice that Visual LISP is loaded along next to it, so you can open open up Visual LISP. We can just go File, Close, then we're out of that file. We can close out of our Visual LISP console, then we're all set. So that's what the acad.lsp file is, and that's what it does.

Contents