Share
 
 

To View the Properties of a VLA-Object (AutoLISP/ActiveX)

In addition to using the Inspect window to view the current value of a variable, you can use it to view the current property values of an object.

Note: ActiveX support in AutoLISP is limited to Windows only.
  1. Store an object in a variable using setq.
  2. Do one of the following:
    • AutoCAD and AutoCAD LT: At the AutoCAD Command prompt, enter (vlax-dump-object object).
      (vlax-dump-object (vlax-get-acad-object))
      
      ; IAcadApplication: An instance of the AutoCAD application
      ; Property values:
      ;   ActiveDocument = #<VLA-OBJECT IAcadDocument 000002569b4802d8>
      ;   Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff78ec15be0>
      ;   Caption (RO) = "Autodesk AutoCAD 2025 - [Drawing1.dwg]"
      ;   Documents (RO) = #<VLA-OBJECT IAcadDocuments 00000256aab93c70>
      ;   FullName (RO) = "C:\\Program Files\\Autodesk\\AutoCAD 2025\\acad.exe"
      ;   Height = 1040
      ;   HWND (RO) = 595288
      ;   LocaleId (RO) = 1033
      ;   MenuBar (RO) = #<VLA-OBJECT IAcadMenuBar 00000256aab94248>
      ;   MenuGroups (RO) = #<VLA-OBJECT IAcadMenuGroups 00000256fcb1fea8>
      ;   Name (RO) = "AutoCAD"
      ;   Path (RO) = "C:\\Program Files\\Autodesk\\AutoCAD 2025"
      ;   Preferences (RO) = #<VLA-OBJECT IAcadPreferences 00000256aac5b2e8>
      ;   Initializing VBA System...StatusId (RO) = ...Indexed contents not shown...
      ;   VBE (RO) = #<VLA-OBJECT VBE 00000256ce7ac5f8>
      ;   Version (RO) = "25.0s (LMS Tech)"
      ;   Visible = -1
      ;   Width = 1916
      ;   WindowLeft = 2
      ;   WindowState = 1
      ;   WindowTop = 0
      T
    • AutoCAD Only:
      1. In Visual LISP, click View Inspect.
      2. In the Inspect dialog box, Symbol box, enter the name of the variable you stored the object in. Click OK.
        Note: You can double-click a property to inspect is current value in another Inspect window. For example, you can double-click <Preferences> to view the properties of the Preferences object associated with the Application object.

Was this information helpful?