;;;Export RNLAY.DAT (rename layers data file) to comma-delimited format. ;;; ;;; AUTHOR: HENRY C. FRANCIS ;;; 425 N. ASHE ST. ;;; SOUTHERN PINES, NC 28387 ;;; All rights reserved without prejudice. ;;; ;;; Copyright: 12-5-96 ;;; Edited: 12-5-96 ;;; (DEFUN c:dattocdf ( / rnlay_dat rd_line rnlay_lst rnlst_ln cdf_out count) (SETQ rnlay_dat (OPEN "U:/LSP/RNLAY.DAT" "r")) (IF rnlay_dat (PROGN (WHILE (SETQ rd_line (READ-LINE rnlay_dat)) (IF rnlay_lst (SETQ rnlay_lst (APPEND rnlay_lst (LIST rd_line))) (SETQ rnlay_lst (LIST rd_line)) ) ;_ end of IF ) ;_ end of WHILE (CLOSE rnlay_dat) (SETQ rnlst_ln (/ (LENGTH rnlay_lst) 4)) (SETQ count 0) (SETQ cdf_out (OPEN "U:/LSP/RNLAY.CDF" "w")) (WRITE-LINE "Old Layer,New Layer,Linetype,Color" cdf_out) (WHILE (< count rnlst_ln) (WRITE-LINE (STRCAT (NTH (* count 4) rnlay_lst) "," (NTH (1+ (* count 4)) rnlay_lst) "," (NTH (+ (* count 4)2) rnlay_lst) "," (NTH (+ (* count 4)3) rnlay_lst) ) cdf_out ) (SETQ count (1+ count)) ) (CLOSE cdf_out) ) ) )