Courtesy Forum Members, my Code :
(defun c:LM_DumpObject (/ prop&methods)
;; Dumps Selected Object in a DCL Box having two List Boxes, one containing Object Properties and second containing Object Methods
;; Courtesy Lee Mac
;; Source : https://www.theswamp.org/index.php?topic=52409.0
(vl-load-com)
;| -------------------------------------------------------------------------
------------------------------------------------------------------------------
FUNCTION DEFINITIONS
------------------------------------------------------------------------------
------------------------------------------------------------------------------
|;
;;
(defun vlax-dump-object->list (obj mth)
(if (eq 'VLA-OBJECT (type obj))
(append (list
(mapcar (function
(lambda (prp / prpval)
(if (not (vl-catch-all-error-p (setq prpval (vl-catch-all-apply 'vlax-get (list obj prp)))))
(list prp prpval)
(list prp nil)
)
)
)
(_GetObjectProperties obj)
)
)
(if mth
(list (_GetObjectMethods obj))
)
)
)
)
;;
(defun _GetObjectProperties (obj)
(vl-remove-if-not (function (lambda (prp) (vlax-property-available-p obj prp))) (_GetVlaProperties))
)
;;
(defun _GetObjectMethods (obj)
(vl-remove-if-not (function (lambda (mth) (vlax-method-applicable-p obj mth))) (_GetVlaMethods))
)
;;
(defun _GetVlaAtoms ()
(eval (list 'defun
'_GetVlaAtoms
'()
(list 'quote
(vl-sort (vl-remove-if-not
(function (lambda (sym) (wcmatch (vl-symbol-name sym) "vla`-*")))
(atoms-family 0)
)
(function (lambda (a b) (< (vl-symbol-name a) (vl-symbol-name b))))
)
)
)
)
(_GetVlaAtoms)
)
;;
(defun _GetVlaProperties ()
(eval
(list 'defun
'_GetVlaProperties
'()
(list 'quote
(mapcar (function (lambda (sym) (substr (vl-symbol-name sym) 9)))
(vl-remove-if-not
(function (lambda (sym) (wcmatch (strcase (vl-symbol-name sym)) "VLA`-GET`-*")))
(_GetVlaAtoms)
)
)
)
)
)
(_GetVlaProperties)
)
;;
(defun _GetVlaMethods ()
(eval
(list 'defun
'_GetVlaMethods
'()
(list 'quote
(mapcar (function (lambda (sym) (substr (vl-symbol-name sym) 5)))
(vl-remove-if
(function (lambda (sym) (wcmatch (strcase (vl-symbol-name sym)) "VLA`-GET`-*,VLA`-PUT`-*")))
(_GetVlaAtoms)
)
)
)
)
)
(_GetVlaMethods)
)
;;
(defun LM:ListBox2 (lis1 lis2 / DCH DCL DES)
;; Makes two List Boxes, each filled with supplied lists
;; lis1 : List1 to be appended in Left List Box
;; lis2 : List2 to be appended in Right List Box
(defun *error* (msg)
(if (and (= 'int (type dch)) (< 0 dch))
(unload_dialog dch)
)
(if (= 'file (type des))
(close des)
)
(if (and (= 'str (type dcl)) (setq dcl (findfile dcl)))
(vl-file-delete dcl)
)
(if (and msg (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*")))
(princ (strcat "\nError: " msg))
)
(princ)
)
(if
(and
(setq dcl (vl-filename-mktemp "tmp.dcl"))
(setq des (open dcl "w"))
(write-line
(strcat
"listbox : list_box { }
example : dialog { label = \"Dump Object\"; spacer; : row {
: listbox { key = \"ls1\"; label = \"Properties\"; width = 50; height = 20; fixed_width = false; fixed_height = false; multiple_select = false ; }
: column {}
: listbox { key = \"ls2\"; label = \"Methods\"; width = 30; height = 20; fixed_width = false; fixed_height = false; multiple_select = false ; }}
ok_only;}"
)
des
)
(not (setq des (close des)))
(< 0 (setq dch (load_dialog dcl)))
(new_dialog "example" dch)
)
(progn (if lis1
(progn (start_list "ls1")
(foreach itm lis1
(add_list (strcat (vl-princ-to-string (car itm)) " = " (vl-princ-to-string (cadr itm))))
)
(end_list)
)
)
(if lis2
(progn (start_list "ls2") (foreach itm lis2 (add_list itm)) (end_list))
)
(start_dialog)
)
)
(if (< 0 dch)
(unload_dialog dch)
)
(if (setq dcl (findfile dcl))
(vl-file-delete dcl)
)
(princ)
)
;;
;| -------------------------------------------------------------------------
------------------------------------------------------------------------------
ACTUAL PROGRAM STARTED
------------------------------------------------------------------------------
------------------------------------------------------------------------------
|;
(setq prop&methods (vlax-dump-object->list (vlax-ename->vla-object (car (entsel))) T))
(LM:ListBox2 (car prop&methods) (cadr prop&methods))
(princ)
)
Run by typing LM_DumpObject in command prompt.