
Originally Posted by
RenderMan
FWIW - Here's a slightly smaller adaptation, with a bit of error checking:
...
** Edit - Actually, I made it simpler still.
Even slightly simpler than that
Code:
(defun IB:GetDBProps (block / props)
(if (not (vl-catch-all-error-p (setq props (vl-catch-all-apply 'vlax-invoke (list block 'GetDynamicBlockProperties)))))
(mapcar '(lambda (obj) (cons (vla-get-PropertyName obj) obj)) props)))
Edit: And if you want to throw away the error checking:
Code:
(defun IB:GetDBProps-F (block)
(mapcar '(lambda (obj) (cons (vla-get-PropertyName obj) obj))
(vlax-invoke block 'GetDynamicBlockProperties)))