Now, once it's working what's the best way to make it run on close even if the 'X' is clicked, also is it possible to make it run only in drawings that existing in certain folders and any sub folders in the location?
X:\Eng\Gen\Asbuilts\*.dwg
but not select subfolders
X:\Eng\Gen\Asbuilts\Temp\*.dwg
I know you mentioned a reactor...but I have the slightest idea what I'm doing with those.
I followed your link from before and found some code posted here on the forums that I think could be modified. I would still like for the users to save their work, just not close without renaming the blocks. It would be nice if they 'End process' their AutoCAD it would generate an error
email/text log save in a location without them knowing with the drawing data, but now I'm probably dreaming
...
Can you send email through CAD?Edit* The only thing I could find as now is a old command from CAB himself
. It's got some writing to text file code in there.
http://www.theswamp.org/index.php?topic=3251.0I also took out the email part. I found some code, but I do not wish to be that obvious with the command. I'm still not finding an existing code for trigger a text file with information. I could of swore I've seen one some time ago.... might had been just another request form a different member.
Looks like I need to do some more searching around.
(defun Save_Reactor_Create()
(vl-load-com)
(if
(not clr:CloseReactor)
(setq clr:CloseReactor
(vlr-Editor-Reactor nil
'((:vlr-beginSave . PurgeBeforeClose))))
); end if
(princ)
); end of Save_Reactor_Create
(Save_Reactor_Create)
(defun PurgeBeforeSave(reac args)
(setq actDoc
(vla-get-ActiveDocument
(vlax-get-acad-object)))
(repeat 3(vla-Purgeall actDoc))
(princ)
); end of PurgeBeforeSave
Thank you again for the help,
Daniel