All,
I found this Lisp that Renderman wrote; it works great. I was wondering what do i need to do to it so it continues to open the file even if part of the filename changes ie; the date without changing the code everytime it's updated
NEW JOB TEMPLATE-7-8-13 - SMALL.dwg
(defun c:OpenMyDwg ( / _OpenDwg )
(defun _OpenDwg (dwg readOnly / f oDwg)
;; RenderMan, CADTutor.net
;; Example: (_OpenDwg "FilePath\\FileName.dwg" T)
(vl-load-com)
(if (and (setq f (findfile dwg)) (/= 1 (getvar 'sdi)))
(vla-activate
(vla-open (vla-get-documents (vlax-get-acad-object))
f
(cond ((= T readOnly) :vlax-true)
((:vlax-false)))))
(cond (f (prompt "\n** Command not available in SDI mode ** "))
((prompt (strcat "\n** \""
(strcase (vl-filename-base dwg))
"\" cannot be found ** "))))))
(_OpenDwg
"F:\\DRAWINGS\\ARCHITECTURAL DETAILS\\NEW JOB\\NEW JOB TEMPLATE-7-8-13 - SMALL.dwg"
T)
(princ))
Thanks,
Brian