From the course: Learning AutoLISP & Visual LISP
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Getting and setting variables - AutoCAD Tutorial
From the course: Learning AutoLISP & Visual LISP
Getting and setting variables
- [Instructor] Besides the name to variables that we can create in LISP, AutoCAD has many variables as well. And we can use these variables while working in production, or we can get the values of the variables and set the values right within AutoLISP. Now, whether AutoCAD variable is an application variable, or drawing-specific, we use the same LISP functions. Let's go ahead and use those, I'm going to create a new LISP, and create a new function. We're going to name this function SETGETVARS. And I'm going to set it, so that we have no variables that we are declaring as local. We have no arguments that we're providing. This is a command, and we're going to not be able to assign a value such as eight or six or three at the command line. We're going to learn about user input later, there's a difference from what we learned about in our last exercise and chapter, to using input from the user. Now that we have the start of their function, and we've closed off our parentheses, our list…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.