try this modified code from @Kent1Cooper
; LGDO log of vl dump data modified from:
; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exracting-list-properties-of-objects-into-txt-file/m-p/9501656#M399570
; by Kent1Cooper https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526
(defun C:LGDO (/ *error* source data txtline) ; = Log of Geometric Data Only
(defun *error* (errmsg)
(if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break"))
(princ (strcat "\nError: " errmsg))
); if
(setvar 'qaflags 0); reset
(princ)
); defun -- *error*
(if (findfile (getvar 'logfilename)); log file already exists
(progn ; then
(setvar 'logfilemode 0); in case currently on
(setq source (open (getvar 'logfilename) "w")); empty any current content
(close source)
); progn
); if
(prompt "\nTo Export their Properties,")
; (if (setq ss (ssget '((0 . "*LINE,ARC,CIRCLE,ELLIPSE"))))
(if (setq ss(ssget "_+.:E:S"))
; [will provide its own "Select objects:" prompt]
; *LINE covers Line/Polyline/Spline/Xline/Mline
(progn ; then
(setvar 'qaflags 2)
(setvar 'logfilemode 1); turn on log file recording
; (command "_.list" ss "")
(vlax-dump-object (vlax-ename->vla-object (ssname ss 0)))
(setvar 'logfilemode 0); turn off
(setvar 'qaflags 0)
); progn
); if
; (setq
; source (open (getvar 'logfilename) "r"); log file just created
; data (open "X:/Your/File/Path/YourFilename.txt" "w"); reduced-content file <-- EDIT this
; data (getfiled "Select a Text File" (getvar"dwgprefix") "txt" 1)
; ); setq
; (while (setq txtline (read-line source)); step through lines in file
; (if
; (not
; (wcmatch
; (vl-string-left-trim " " txtline); remove leading spaces
; "`[ A*,_.li*,Sel*,Spa*,Col*,Line*,Tra*,Thi*,Han*,Pre*,Ent*,Com*"
; ;; beginnings of unwanted-line content [could be more]
; ); wcmatch
; ); not
; (write-line txtline data); then -- put line into geometric data file
; ); if
; ); while
; (close source)
; (close data)
(startapp "Notepad" (findfile (getvar 'logfilename)))
(princ)
); defun