So where are you stuck with this?
This should give you the centre point of a text,
;;centre point of text
(defun c:txtcentre ( / txtset myent acount alignment Edata pt)
(defun gettextalign ( myent / txtset Edata ptx_old pty_old pty_new ptx_new mycons)
(setq Edata (entget myent))
(setq mycons 10)
(if (/= 0 (nth 1 (cdr (assoc 11 Edata))))(setq mycons 11))
(setq ptx_old (nth 1 (assoc mycons Edata)))
(setq pty_old (nth 2 (assoc mycons Edata)))
(command "_.justifytext" myent "" "MC")
(setq Edata (entget myent))
(setq ptx_new (nth 1 (assoc mycons Edata)))
(setq pty_new (nth 2 (assoc mycons Edata)))
(if (< ptx_old ptx_new)(setq alignx "L"))
(if (> ptx_old ptx_new)(setq alignx "R"))
(if (= ptx_old ptx_new)(setq alignx "C"))
(if (> pty_old pty_new)(setq aligny "T"))
(if (< pty_old pty_new)(setq aligny "B"))
(if (= pty_old pty_new)(setq aligny "M"))
(setq xyalign (strcat aligny alignx))
(command "_.justifytext" myent "" xyalign)
xyalign
)
(princ "\nSelect Text")
(setq txtset (ssget '((0 . "*TEXT"))))
(setq acount 0)
;;Loop from here if needed
(setq myent (ssname txtset acount))
(setq Edata (entget myent))
(setq alignment (gettextalign myent))
(command "_.justifytext" myent "" "MC")
(if (= (cdr (assoc 0 Edata)) "MTEXT")
(setq pt (assoc 10 (entget myent)))
(setq pt (assoc 11 (entget myent)))
)
(setq ptx (car pt))
(setq pty (cdr pt))
(command "_.justifytext" myent "" alignment)
;;end loop here if needed
(princ "x:")(princ ptx)
(princ "\nY:")(princ pty)
)
There are lots of examples out there to export to CSV and you should be able to build that up from above, the drawing and the text string (again lots of examples out there)
Lee Mac also had this to find the centre of the text, either in this forum or on his website:
(defun LM:txtcentre ( / b e centretext)
(cond
( (not (setq e (car (nentsel)))))
( (not (setq b (LM:textbox (entget e))))
(princ "\nInvalid object selected - please select text, mtext or attribute.")
)
( (entmake
(list
'(000 . "POINT")
(cons 010 (trans (mapcar '(lambda ( a b ) (/ (+ a b) 2.0)) (car b) (caddr b)) e 0))
(assoc 210 (entget e))
)
)
)
( (princ "\nUnable to create central point."))
)
(setq centretext (trans (mapcar '(lambda ( a b ) (/ (+ a b) 2.0)) (car b) (caddr b)) e 0) )
(list centretext e)
)
So back to my question, where are you stuck with this?