(defun get-prop (obj prop / res)
(if (and obj
(= (type obj) 'vla-object)
(not (vl-catch-all-error-p
(setq res (vl-catch-all-apply (function (lambda () (vlax-get-property obj prop)))))
) ;_ end of vl-catch-all-error-p
) ;_ end of not
) ;_ end of and
res
) ;_ end of if ;)
) ;_ end of defun
(defun c:test (/ ent)
(setq ent (car (entsel "\nВыберите любой примитив : ")))
(foreach prop (vl-sort '("length" "visible" "width" "coordinates") (function <))
(princ (strcat "\n"
(cdr (assoc 0 (entget ent)))
"; Property = "
prop
"; Value = "
(vl-princ-to-string (get-prop (vlax-ename->vla-object ent) prop))
) ;_ end of strcat
) ;_ end of princ
) ;_ end of foreach
(princ)
) ;_ end of defun