Yes, I have a routine that will wblock out the currect drawing to create a clean drawing. I then want to close the drawing and DO NOT save changes.
(defun C:Cleanwblock ()
(princ "\nwMake a New Clean Drawing")
(setvar "FILEDIA" 0)
(setvar "CMDDIA" 0)
(setvar "CMDECHO" 1)
(command "-layer" "on" "*" "thaw" "*" "unlock" "*" "")
(command ".regen")
(if (setq jset (ssget "x"))
(progn
(setq jdwg (getvar "DWGNAME"))
(setq jpath (getvar "DWGPREFIX"))
(setq jfile (strcat jpath jdwg))
(if (findfile jfile )
(command "-wblock" jfile "Y" "" "0,0,0" "p" "" "N")
(command "-wblock" jfile "" "0,0,0" "p" "" "N")
)
)
(princ "\nNo Entities to Wblock")
)
(setvar "FILEDIA" 1)
(setvar "CMDDIA" 1)
(command "close" jfile) ;;<----This does not work..
(princ)
)