http://bbs.mjtd.com/thread-92336-1-1.html
(defun c:dcl2lsp ( / fname1 fn1 fname2 fn2 k fn1l fn2l ) (setq fname1 (getfiled "Select DCL file" "" "dcl" 16)) (setq fn1 (open fname1 "r")) (setq fname2 (getfiled "File to save" "" "lsp" 1)) (setq fn2 (open fname2 "w")) (while (setq fn1l (read-line fn1)) (setq fn2l fn1l) (setq k 0) (while (setq k (vl-string-search "\"" fn2l k)) (setq fn2l (vl-string-subst "\\\"" "\"" fn2l k)) (setq k (+ k 2)) ) (setq fn2l (strcat "(write-line \"" fn2l "\" fn)")) (write-line fn2l fn2) ) (close fn1) (close fn2) (princ))
(defun c:lsp2dcl ( / fname1 fn1 fname2 fn2 k fn1l fn2l ) (setq fname1 (getfiled "Select LSP file" "" "lsp" 16)) (setq fn1 (open fname1 "r")) (setq fname2 (getfiled "File to save" "" "dcl" 1)) (setq fn2 (open fname2 "w")) (while (setq fn1l (read-line fn1)) (setq fn2l fn1l) (setq fn2l (substr fn2l (+ (vl-string-search "\"" fn2l) 2) (- (vl-string-position (ascii "\"") fn2l nil T) (+ (vl-string-search "\"" fn2l) 1)))) (setq k 0) (while (setq k (vl-string-search "\\\"" fn2l k)) (setq fn2l (vl-string-subst "\"" "\\\"" fn2l k)) (setq k (+ k 1)) ) (write-line fn2l fn2) ) (close fn1) (close fn2) (princ))