From the course: Learning AutoLISP & Visual LISP

Function: vla-get-activedocument - AutoCAD Tutorial

From the course: Learning AutoLISP & Visual LISP

Function: vla-get-activedocument

- [Instructor] Previously, we looked at how we can get the AutoCAD application object using the Visual LISP function VLAX-GET-ACAD-OBJECT. The end result was a variable called ACADOBJ and it contained many properties. Notice that one of the properties is the active document. The active document is another way of saying the current drawing. Let's get our active document object. I'm going to create a variable. We'll name them ACDOC and we'll get, just as we did with any other property, the active document. It's simply the name of the property and the object where that property resides. I'm going to store that active document to a variable called ACDOC. Then we can use different properties or make adjustments to different properties right inside our active document or drawing.

Contents