lisp help closing current drawing

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello ALL,
Below is the end of a lisp program I run to create an ACAD Electrical drawing package.
I am trying to close the current drawing and open the 1st drawing in the new project.
It will work fine but instead of closing the current drawing it opens the new drawing in a new window and the current drawing stays open and active.
I have tried closing the drawing in the lisp (command "close" "n" "y") but it will close both drawings no matter where i place it in the LISP.
Can anyone point me in the right direction as to how i can close the current and make the new drawing active?
thanks for any help you can give me!!!
Dennis
;--------------------------------------------------------------------------------------------------------------------------------------------------;
;WRAP UP PROGRAM AND END QUIETLY ;OPEN PROJECT AND SET TO CURRENT ;UPDATE PROJ WIDE SHEET #'S ;
;--------------------------------------------------------------------------------------------------------------------------------------------------;
(close PROJECTFILE) ;closes project file
(prompt "\nProject Creation Successful!") ;prompts good project created
(c:wd_makeproj_current (strcat DWGDIR "/" JOBNUM " " CLIENTNAME " " machinetype ".wdp")) ;makes new proj active
(vla-open (vla-get-documents (vlax-get-acad-object)) (strcat DWGDIR"/"JOBNUM"_001.DWG")) ;opens first drawing in project
(c:ace_projwide_script "NIL" "(c:shtnum)") ;changes sheet # to = dwg #
(PRINC) ;peace out have a good day
);defun main
(princ)