Adesu
2007-03-02, 09:22 AM
Hi Alls,
if you have 500 file lsp,and you got trouble to compile alls lsp file to fas file ,because it work one by one,I have solution to alls lsp file in one second,try it.
here that code
; cltf is stand for Convert Lsp To Fas
; Design by : Adesu <Ade Suharna>
; Email : mteybid@yuasabattery.co.id
; Homepage : http://www.yuasa-battery.co.id
; Create : 02 March 2007
; Program no.: 0552/03/2007
; Edit by :
; Idea from : Jim Dee at www.caddee.com
; Remark : before run this program,you sould prepare folder for
; destination object
(defun c:cltf (/ lsp fas lst)
(setq lsp (dos_getdir "Browse for folder" " " "Select a folder as source" t))
(setq fas (dos_getdir "Browse for folder" " " "Select a folder as destination" t))
(setq lst (vl-directory-files lsp "*.lsp" 1))
(if
lst
(progn
(foreach x lst
(vlisp-compile
'st
(strcat lsp x)
(strcat fas (substr x 1 ( - (strlen x) 4)) ".fas")
)
) ; foreach
) ; progn
(alert "There is not contained file")
) ; if
(princ)
) ; defun
if you have 500 file lsp,and you got trouble to compile alls lsp file to fas file ,because it work one by one,I have solution to alls lsp file in one second,try it.
here that code
; cltf is stand for Convert Lsp To Fas
; Design by : Adesu <Ade Suharna>
; Email : mteybid@yuasabattery.co.id
; Homepage : http://www.yuasa-battery.co.id
; Create : 02 March 2007
; Program no.: 0552/03/2007
; Edit by :
; Idea from : Jim Dee at www.caddee.com
; Remark : before run this program,you sould prepare folder for
; destination object
(defun c:cltf (/ lsp fas lst)
(setq lsp (dos_getdir "Browse for folder" " " "Select a folder as source" t))
(setq fas (dos_getdir "Browse for folder" " " "Select a folder as destination" t))
(setq lst (vl-directory-files lsp "*.lsp" 1))
(if
lst
(progn
(foreach x lst
(vlisp-compile
'st
(strcat lsp x)
(strcat fas (substr x 1 ( - (strlen x) 4)) ".fas")
)
) ; foreach
) ; progn
(alert "There is not contained file")
) ; if
(princ)
) ; defun