so for some reason our drafters have issues with saving, really... and it doesn't get caught in time to use the back up files
so here's what i'm trying, the problem is that it keeps saving the backup of the file being closed with the filename of the drawing being opened...sometimes
(vlr-remove-all :VLR-DWG-REACTOR)
(VLR-DWG-REACTOR
nil
'((:VLR-BEGINCLOSE . saveacopy))
)
(DEFUN saveacopy (something somethingelse)
(IF (NOT
(SETQ opened (OPEN (SETQ tempname (STRCAT (GETVAR "SAVEFILEPATH")
(MENUCMD
"M=$(edtime,$(getvar,date),mon-dd-yyyy-h-mmam/pm)"
)
"-"
(GETVAR "DWGname")
)
)
"r"
)
)
)
(VLA-SENDCOMMAND
(VLAX-GET (VLAX-GET-ACAD-OBJECT) "activedocument")
(STRCAT "filedia " "0 " ".save\r" tempname "\r" "filedia " "1 ")
)
(CLOSE opened)
)
)
any ideas
again i appologize this isn't the prettiest code...