Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
(defun c:TEST()
(setq A (getvar "dwgname"))
(setq B "dwg")
(if (equal (substr A (- (strlen A) 3)(strlen A)) B)
(command "QSAVE")(command "_.close" "y" ""))
(princ)
)
--------------
Hello,
I am trying to build a lisp that if filename extention is .dwg will be close without save (for any change). Otherwise, It will be saved (specify that filename is .dxf).
But the lisp above is not working. It alway (command "_.close" "y" "") for any .dwg&.dxf.
Does anybody know the reason why?
Thank you for yourtime!
Solved! Go to Solution.