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.
Functions: sslength and ssname - AutoCAD Tutorial
From the course: Learning AutoLISP & Visual LISP
Functions: sslength and ssname
- [Instructor] Once we have the selection set, we're going to want to do something with the objects in the selection set. There's two LISP functions that are going to assist us. The first one is SSLENGTH it returns the total count of objects within the selection set. So let's put that to use in our loop function. While our counter variable is less than the total count of the objects in our selection set, we're going to iterate through and do something. We see how SSLENGTH simply it needs to have the selection set value provided to it as an argument. The other selection function that we're going to look at is SSNAME. SSNAME is able to provide us information about that entity at a specific location in the selection set. We're going to get the entity data, we've used N to get before when we selected the entity individually. Then we're going to combine it with SSNAME. SSNAME needs to have the selection set provided as a value in argument. Then set the location in the selection set for the…
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.