请尝试以下代码,将Lisp(*.lsp)文件转换为快速安全的(*.fas)文件。。。
- ;; LSP2FAS.lsp ; Scot Harris 11-29-2012
- ;; Minimizes the sequence needed to create FAS files.
- ;; Help facility added.
- ;; Streamlined from original program provided by aqdam1978.
- (defun c:LSP2FAS-Help (/)
- (alert (strcat
- "\tLisp (LSP) to Fast and Secure (FAS) Help"
- "\n "
- "\nFile dialog begins in the current directory. "
- "\nIt is suggested to place and open a drawing (DWG) "
- "\ninside the input folder you wish to batch process. "
- "\n "
- "\nOutput file will be in the same folder as the file selected. "
- "\n "
- "\nThere is no provisional check for an existing FAS file of the same name. "
- ))
- );end LSP2FAS-Help
- (defun c:LSP2FAS ( / a )
- (vl-load-com)
- (prompt " Lisp to Fast and Secure (FAS). LSP2FAS-Help available. ")
- (if (wcmatch (strcase (setq a (getfiled "Convert LSP File to FAS" (getvar "DWGPREFIX") "" 16))) "*.LSP")
- (progn
- (c:vlide)(vlisp-compile 'st a)
- (princ (strcat "\n File " (vl-string-subst ".fas" ".lsp" a) " created. "))
- );progn
- (alert "File extension must be ".LSP" ")
- );if
- (princ)
- );end LSP2FAS
|