; QE.LSP : ÆíÁý°ú ·Îµù(loading)À» Çѹø¿¡ ó¸®ÇÏ´Â ÇÁ·Î±×·¥ ; ÀÛ¼ºÀÏ : 1994. 1. 6. ; ÀÛ¼ºÀÚ : ÃÖ¹®¼± ; Àü¿ªº¯¼ö ; *LAST* : ¸¶Áö¸·À¸·Î ÆíÁýÇÑ È­ÀÏÀÇ À̸§ (setq *LAST* (getvar "DWGNAME")) ; ¹®ÀÚ¿­ ÁßÀÇ ÀϺΠ¹®ÀÚ¸¦ ãÀº ÈÄ ; ±× ¹®ÀÚ¸¦ Áß½ÉÀ¸·Î ¹®ÀÚ¿­À» ºÐ¸®ÇÑ´Ù (defun divstr (str tok / strl tokl no cont) (setq strl (strlen str) tokl (strlen tok) no 1 cont T) (while (and (<= no strl) cont) (if (= (substr str no tokl) tok) (setq cont nil) (setq no (1+ no)) ) ) (list (substr str 1 (1- no)) (substr str no)) ) (defun C:QE ( / ext sn rs) (setq ext (list ".LSP" ".MNU" ".SCR")) (setq sn (strcase (getstring (strcat "\nSource name <" *LAST* ">: ")))) (if (= sn "") (setq sn *LAST*) (setq *LAST* sn)) (setq rs (divstr sn ".")) (if (= (cadr rs) "") (progn (while (and ext (not (findfile (strcat sn (car ext))))) (setq ext (cdr ext)) ) (if ext (setq sn (strcat sn (car ext)))) ) ) (if (findfile sn) (setq sn (findfile sn))) (command "EDIT" sn) (setq rs (divstr sn ".")) (if (findfile sn) (cond ((= (cadr rs) ".LSP") (load (car rs))) ((= (cadr rs) ".MNU") (command "MENU" (car rs))) ((= (cadr rs) ".SCR") (command "SCRIPT" (car rs))) ) ) (princ) )