I am running a lisp routine that creates a project with drawings pulled from a template.
All is working fine execpt at the end of the routine.
I open the first dwg in the project.
if the lisp program was started on a DWG that was saved before starting the lisp, the "fileopen" will fail due to the fact that the lisp first tells it to not save changes.
if i change the routine to assume that the dwg has been saved and its not, the "fileopen" fails again
Is there any way to tell if the current drawing has been saved???
Is there a way to save the current drawing in the routine?
Is there a better way to do this??
here is the end of the lisp for ref. "Y" is where it tells whether or not to save the current drawing
Thanks for any help
(prompt "\nProject Creation Successful!")
(c:wd_makeproj_current (strcat DWGDIR"/"JOBNUM".WDP")) ;makes new proj active
(command "FILEOPEN" "Y" (strcat DWGDIR"/"JOBNUM"_MCP_001.DWG")) ;opens first drawing in project
(c:ace_projwide_script "" "(c:shtnum.lsp)")
A simpe solution is to just make a change to the current document, so that it always is changed before you run your file open.
Add something like:
(command "LINE" "0,0" "10,10" "") (command "ERASE" "L" "")
Please select "Accept As Solution" if this post answers your question. Kudos don't hurt either. ;-)