可用文件保存:
 - (defun readfile (lst file)
- (if (setq fn (findfile file)) (progn
- (setq fp (open fn "r"))
- (foreach x lst (set x (read-line fp)))
- (close fp)
- ) (progn
- (setq mrsj '("note" "dim" "hat" "sym" "note" "dim"));默认值
- (mapcar '(lambda (x y)(set x y)) lst mrsj)
- ))
- )
- (defun writefile (lst file)
- (setq fp (open file "w"))
- (setq i 0)
- (foreach x lst (princ (strcat (eval x) "\n") fp))
- (close fp)
- )
- (defun standard()
- (setq blb '(text-layer dim-layer hatch-layer symbols-layer text-style dim-style)
- (readfile blb "datafile") ;读数据
- ; ...
- (writefile blb "datafile") ;写数据
- )
|