AutoCAD Electrical
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
lisp routine and fileopen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello All,
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
Dennis
(close PROJECTFILE)
(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)")
(PRINC)
Re: lisp routine and fileopen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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" "")
THL
Please select "Accept As Solution" if this post answers your question. Kudos don't hurt either. ;-)

