;;; Wblock entire drawing with same filename without dialogue box in order reduce file size
;;; Created by Igal Averbuh 2016
(defun c:wed (/ tr)
(if (= (setq tr (getvar 'filedia)) 0)
(setvar 'filedia 1)
)

(setq outputfile
(strcat
(getvar 'dwgprefix)
(vl-filename-base (getvar 'dwgname))
".dwg"
)
)

(vl-cmdf "-wblock" outputfile "Y" "*")
(setvar 'filedia tr)
)
(c:wed)

Advertisements