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.

Function: vlax-get-acad-object

Function: vlax-get-acad-object - AutoCAD Tutorial

From the course: Learning AutoLISP & Visual LISP

Start my 1-month free trial

Function: vlax-get-acad-object

- One of the benefits of the Visual LISP functions, is that you can get data, and even change some of the data connected to the AutoCAD application as a whole. And also, Visual LISP really begins to take us down into learning more about working with objects in our code. The first object that we're going to interact with is the AutoCAD application, and so as we learned it in our last chapter, we're going to first include the VL-LOAD-COM call and then we're just going to create a standard LISP function. Make sure that we can call it from the command line. And we are going to create a variable called ACADOBJ. We just want to call it as a local variable. I also am just going to go ahead and include that enclosing or last line for printing to the command line with no value. And so now all we're going to do is create a variable called ACADOBJ, and this will contain the ACAD application object. How do we get it? We call the LISP function, VLAX dash GET dash ACAD dash OBJECT. It's one of the…

Contents