From the course: AutoCAD Customization for CAD Managers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Simple LISP routine

Simple LISP routine - AutoCAD Tutorial

From the course: AutoCAD Customization for CAD Managers

Start my 1-month free trial

Simple LISP routine

- [Instructor] We're going to create a simple LISP routine which will greet our users. And to do this, let's create a visual LISP file. So I'm going to use the Visual LISP Editor from the Manage ribbon Applications panel, and we're going to create a new LISP file. We're going to create a custom function named greetusers and then I'll close it out. And so this is an auto LISP function. We are creating or defining a custom function, and notice we've closed it out already with parentheses calling greetusers. To greet the users, we need to know the username. So let's get the username from an AutoCAD application variable. We're going to store the username in a defined variable that we can call later. We'll name that variable username. And so what we have on this line, setq means we're creating or setting a variable. The variable name is username. The variable value is what is returned from the AutoCAD LISP routine function called getvar or get variable. This function needs to know the…

Contents