Greetings, I've looked long and hard through the discussion groups but I can't seem to find the scenario similar enough to help me with my problem. I'm trying to create a LISP routine to export the Layout Tab Names to a text file. I can't get the (layoutlist) to work in any acceptable manner. So far: (setq Layouts (vl-remove "Model" (layoutlist))) (setq DD (rtos (getvar "CDATE") 2 6)) (setq YEAR (substr DD 3 2) MONTH (substr DD 5 2) DAY (substr DD 7 2)) (setq MONTH (itoa (atoi MONTH))) (setq DAY (itoa (atoi DAY))) (setq TT (strcat (getvar "DWGPREFIX") ";" (getvar "DWGNAME" ---LAYOUT NAMES HERE---))) (setq FN (strcat "X:/Drawing Logs/" MONTH "-" DAY "-" YEAR ".txt")) (setq F0 (open FN "a")) (if F0 (progn (write-line TT F0) (close F0) ) ) My goal is to use ScriptPro to run this on a slew of files. IDEALLY I'd love to see the tabs delimited by a semi colon instead of quotes so the resulting file can be imported into excel. I (obviously) don't know enough about LISP to capture/manipulate/use the resulting data from the (layoutlist) call. There's a lot of people on here who have helped others with their layoutlist problems, and I hope someone will be able to help me as well. Thank you! Thom K.
Try this inlay: -------------------------- (setq Layouts (vl-remove "Model" (layoutlist))) (setq laynames ""); init (foreach lay Layouts (setq laynames (strcat laynames lay ";")) ); foreach (setq DD (rtos (getvar "CDATE") 2 6)) (setq YEAR (substr DD 3 2) MONTH (substr DD 5 2) DAY (substr DD 7 2)) (setq MONTH (itoa (atoi MONTH))) (setq DAY (itoa (atoi DAY))) (setq TT (strcat (getvar "DWGPREFIX") "," (getvar "DWGNAME") "," laynames))
Bob, You are a Super Genius! That Rocks! That is EXACTLY what I was looking for. You've made my cold, windowless day all the better. Thank you again! Thom K.