Dump Object

Function Syntax dump / dumpn / (LM:dump <obj>)
Current Version 1.1
Arguments
Symbol Type Description
obj VLA-Object / EName / DXF List VLA-Object, Entity Name or DXF List to query

Program Description

This is a very simple utility to enable the user to list the properties & methods of a VLA-Object.

The function will accept as an argument a VLA-Object, Entity Name, or an Entity DXF List and will proceed to use the vlax-dump-object function to list the properties & methods of the supplied object or VLA-Object equivalent of the supplied Entity or DXF List.

The utility also permits the user to select primary or nested objects by typing dump or dumpn respectively at the command line.

Select all
;;---------------------=={ Dump Object }==--------------------;;
;;                                                            ;;
;;  Lists the properties & methods of a supplied VLA-Object   ;;
;;  or VLA-Object equivalent of a supplied ename or DXF list. ;;
;;------------------------------------------------------------;;
;;  Author: Lee Mac, Copyright  2013 - www.lee-mac.com       ;;
;;------------------------------------------------------------;;
;;  Arguments:                                                ;;
;;  obj - VLA-Object, Entity Name, or Entity DXF List         ;;
;;------------------------------------------------------------;;

(defun c:dump  nil (LM:dump (car (entsel))))
(defun c:dumpn nil (LM:dump (car (nentsel))))

(defun LM:dump ( obj )
    (cond
        (   (or (= 'ename (type obj))
                (and (listp obj) (= 'ename (type (setq obj (cdr (assoc -1 obj))))))
            )
            (vlax-dump-object (vlax-ename->vla-object obj) t)
        )
        (   (= 'vla-object (type obj))
            (vlax-dump-object obj t)
        )
    )
    (princ)
)
(vl-load-com) (princ)

Example of Output

The following output was the result of supplying the above LM:dump function with a VLA Circle Object constructed in the WCS plane at zero elevation, centered at the origin, with radius 1.

; IAcadCircle: AutoCAD Circle Interface
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 019a91b4>
;   Area = 3.14159
;   Center = (0.0 0.0 0.0)
;   Circumference = 6.28319
;   Diameter = 2.0
;   Document (RO) = #<VLA-OBJECT IAcadDocument 0ed59d50>
;   Handle (RO) = "39C"
;   HasExtensionDictionary (RO) = 0
;   Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 1706cccc>
;   Layer = "0"
;   Linetype = "ByLayer"
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Material = "ByLayer"
;   Normal = (0.0 0.0 1.0)
;   ObjectID (RO) = 2129672608
;   ObjectName (RO) = "AcDbCircle"
;   OwnerID (RO) = 2129665272
;   PlotStyleName = "ByLayer"
;   Radius = 1.0
;   Thickness = 0.0
;   TrueColor = #<VLA-OBJECT IAcadAcCmColor 0f077168>
;   Visible = -1
; Methods supported:
;   ArrayPolar (3)
;   ArrayRectangular (6)
;   Copy ()
;   Delete ()
;   GetBoundingBox (2)
;   GetExtensionDictionary ()
;   GetXData (3)
;   Highlight (1)
;   IntersectWith (2)
;   Mirror (2)
;   Mirror3D (3)
;   Move (2)
;   Offset (1)
;   Rotate (2)
;   Rotate3D (3)
;   ScaleEntity (2)
;   SetXData (2)
;   TransformBy (1)
;   Update ()

textsize

increase · reset · decrease

Designed & Created by Lee Mac © 2010