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.

Using a cond condition function

Using a cond condition function - AutoCAD Tutorial

From the course: Learning AutoLISP & Visual LISP

Start my 1-month free trial

Using a cond condition function

- [Instructor] Another conditional LSP function is more than just a true or false. It will simply run only if a condition is met. And so you can have as many different arguments, and only that argument that is set to true will actually run. Let's go ahead and create a new LSP function, and we'll call it the same as the last one, IFCON. And we don't have any local variables yet. And, of course, I'm going to close out my parentheses. Inside this activity, or this function, we're going to create a new local variable. And we'll name it FILRAD. And it's going to me equal to the results of whatever the current radius value of our fillet is. And since this is a variable that I want to be local, I'll go ahead and add it to the right side in my define function argument. So if I get this variables value and set it to FILRAD, it currently is zero. Let's go ahead and create a new conditional, using the LSP function, COND. With this function, we'll go ahead and close it out here. And notice I…

Contents