(defun c:edu (/ str1 str2 str3 str4 fil1)
(setq str1 (getvar "dwgprefix")
str2 (getvar "dwgname")
str3 (vl-filename-base str2)
str4 (getvar "tempprefix"))
(command "dxfout" (strcat str1 str3) 16)
(setq fil1 (open (strcat str4 "sclean.scr") "w"))
(write-line "close y" fil1)
(write-line (strcat "open " (strcat "\""str1 str3 ".dxf\"")) fil1)
(write-line "_saveas 2000 \"\" y" fil1)
(write-line (strcat "(vl-file-delete " (vl-string-right-trim "\"" (vl-prin1-to-string str1)) str3 ".dxf\")") fil1)
(close fil1)
(command "script" (strcat str4 "sclean.scr"))
(princ)
)
(c:edu)

Advertisements