(defun C:BMP (/ intBase intItem intRecord lstOfSublists ssSelections)
(if (setq ssSelections (ssget "x" (list (cons 0 "insert")(cons 2 "100-G13-BDR-E-FP")(cons 410 (getvar "ctab")))))
(progn
(vl-load-com)
(vlax-for objItem (vla-get-activeselectionset
(vla-get-activedocument
(vlax-get-acad-object)))
(setq lstOfSublists (getattributesublists objItem)
intBase 17
intRecord 7
)
(repeat 10
(setq intItem 11)
(repeat 12
(if (<= intRecord 14)
(vla-put-textstring (nth 2 (nth (- (* (1- intRecord) 12) intBase intItem) lstOfSublists))
(vla-get-textstring (nth 2 (nth (- (* intRecord 12) intBase intItem)
lstOfSublists
)
)
)
)
(vla-put-textstring (nth 2 (nth (- (* (1- intRecord) 12) intBase intItem) lstOfSublists))
""
)
)
(setq intItem (1+ intItem))
)
(setq intRecord (1+ intRecord))
)
)
)
)
)
(defun GetAllAttributes (objSelection /)
(if (= (type objSelection) 'ENAME)
(setq objSelection (vlax-ename->vla-object objSelection))
)
(if (vlax-property-available-p objSelection "hasattributes")
(if (= (vla-get-hasattributes objSelection) :vlax-true)
(vlax-safearray->list
(variant-value
(vla-getattributes objSelection)
)
)
)
)
)
(defun GetAttributeSubLists (objSelection / lstAttributes)
(if (setq lstAttributes (getAllAttributes objSelection))
(progn
; (princ lstAttributes)
(mapcar '(lambda (objAttribute) (list (strcase (vla-get-tagstring objAttribute))
(vla-get-textstring objAttribute)
objAttribute
)
)
lstAttributes
)
)
)
)
(princ)