- (defun tt(blkname / blks a b)
- (if(=(type(setq a(VL-CATCH-ALL-APPLY'vla-item(list(vlax-get-property(vlax-get-property(vlax-get-acad-object)'activedocument)'blocks)blkname))))'VLA-OBJECT)
- (progn(vlax-for x a(if(=(vlax-get-property x 'ObjectName)"AcDbBlockReference")(setq b(cons(vlax-get-property x'name)b))))
- (if b(List blkname(mapcar 'tt b))blkname))))
;;(TT"B1")
;;("B1" (("E" ("D")) ("B" ("A")))) |