They are dynamic blocks in your sample so this matches your sample, it can be changed to work with any dynamic blocks.
Try it
https://www.cadtutor.net/forum/topic/73872-fill-csv-file-with-block-attributes/
;; Get Dynamic Block Property Value - Lee Mac
;; Returns the value of a Dynamic Block property (if present)
;; blk - [vla] VLA Dynamic Block Reference object
;; prp - [str] Dynamic Block property name (case-insensitive)
(defun LM:getdynpropvalue ( blk prp )
(setq prp (strcase prp))
(vl-some '(lambda ( x ) (if (= prp (strcase (vla-get-propertyname x))) (vlax-get x 'value)))
(vlax-invoke blk 'getdynamicblockproperties)
)
)
(defun LM:getdynprops ( blk )
(mapcar '(lambda ( x ) (cons (vla-get-propertyname x) (vlax-get x 'value)))
(vlax-invoke blk 'getdynamicblockproperties)
)
)
(defun c:exdynblk ( / ss blk x lst fo str)
(setq ss (ssget (list (cons 0 "INSERT"))))
(if (= ss nil)
(progn (alert "You have not picked blocks ")(exit))
(progn
(setq fo (open "d:\\acadtemp\\dynblks.csv" "W"))
(setq num 0)
(repeat (setq x (sslength ss))
(setq blk (vlax-ename->vla-object (ssname ss (setq x (- x 1)))))
(setq lst (LM:getdynprops blk ))
(setq str (strcat
(rtos (setq num (1+ num)) 2 0)
","
(rtos(cdr (nth 0 lst)) 2 2)
","
(rtos (cdr (nth 2 lst)) 2 2)
","
(rtos (cdr (nth 4 lst)) 2 2)
)
)
(princ str)
(write-line str fo)
)
(close fo)
)
)
(princ)
)
(c:exdynblk)