ripuz Posted February 28, 2012 Posted February 28, 2012 Hi! Is it possible to get autocad to do something when a specific file is modified (like a reactor works)? I´m not to hopeful that it is even possible but I guess somebody here has the answer. Thanks in advance, Thomas Quote
BlackBox Posted February 28, 2012 Posted February 28, 2012 ... The 'specific file': Is it open, and accessible in the Documents Collection Object? Is it read-only? In what way is the file to be modified, a simple open and save, or are wanting to monitor the database? ... The 'do something': What are you wanting to do? On which file, the 'special file', or another file? More information is needed; please be more specific. Quote
ripuz Posted February 29, 2012 Author Posted February 29, 2012 Let´s say there are two people and in some way they want to 'communicate' through AutoCad. My first thought was to have a text file that both can change. But the problem is: how can one person know when the other person has changed the text file? The second tought was to have the same drawing open but that may not work because only one of them can write in the file. Maybe if both have two drawings open, person1 can write in drawing1 and has drawing2 as read-only and person2 has drawing1 as read-only but can write in drawing2. The 'thing to do' could be a simple princ, it´s not that important. Don´t ask why I´m doing this... it´s just for fun! Quote
Tiger Posted February 29, 2012 Posted February 29, 2012 Collaborate through Google Docs instead? I haven't done it, but I have assumed that Google have a clever system for collaborating on the same documents. Quote
MSasu Posted February 29, 2012 Posted February 29, 2012 You can find here some solutions regarding the state of files (in use or not). If you want to keep track of modifications you can maintain a log file (simple ASCII file) with date of modification and size for your drawings and compare last record with current features. Place this log on a network location to be available for both of you and add the validation tool in start-up to check the current drawing. (if (= (getvar "DWGTITLED") 1) (ValidationRoutine (strcat (getvar "DWGPREFIX") (getvar "DWGNAME")))) Regards, Mircea Quote
MSasu Posted February 29, 2012 Posted February 29, 2012 Regarding the maintenance of the log file, this can be made either by redefining the Close command or by using a close event reactor (see here a thread on this mater). Regards, Mircea Quote
Lee Mac Posted February 29, 2012 Posted February 29, 2012 Look on this page for 'Messenger.lsp': http://web2.airmail.net/terrycad/AutoLISP-Code.htm Quote
ripuz Posted March 1, 2012 Author Posted March 1, 2012 I will take my time and go through all your suggestions! Thanks all of you! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.