defun jmm:list2file (outList fname / f) (setq f (open fname "w")) (foreach line outlist (write-line line f) ) (close f) ) (defun jmm:props2list (obj / lay area) (setq obj (vlax-ename->vla-object obj) lay (vla-get-layer obj) area (vla-get-area obj)) (if (not *areaList*) (setq *areaList* (list (strcat lay "," (rtos area)))) (setq *areaList* (cons (strcat lay "," (rtos area)) *areaList*)) ) ) (defun c:saveareas (/ ss idx ent) (if (setq ss (ssget '((0 . "*POLY*,SPLINE,CIRCLE,ELLIPSE,REGION")))) (progn (setq idx -1 *areaList* nil) (while (< (setq idx (1+ idx))(sslength ss)) (setq ent (ssname ss idx)) (jmm:props2List ent) ) (jmm:list2file *arealist* (strcat (getstring t "\nCSV file to create?: ") ".csv")) ) ) (princ "\nDone....") (princ) )