Originally Posted by
prose
Can someone please tell me what I am doing wrong or missing.
I am trying to saveas the current file in 2000 format in the same location with the same name but adding "_version2000" at the end.
Code:
(defun C:GetReadyToEmail ()
(setq fdd (getvar "filedia"))
(command "filedia" "0")
(setq fn(strcat (getvar "dwgprefix")(getvar"dwgname") "_version2000"))
(command "saveas" "2000" fn)
(command "filedia" fdd)
)
Any ideas?
what is not working?
do you need to trim off the .dwg from the end of the dwgname?
Try this:
Code:
(vl-load-com)
(defun C:GetReadyToEmail (/ fdd fn)
(setq fdd (getvar "filedia"))
(command "filedia" "0")
(setq fn(strcat (getvar "dwgprefix")(vl-filename-base(getvar"dwgname")) "_version2000"))
(command "saveas" "2000" fn)
(command "filedia" fdd)
)