Hello Gentlemen,
I am a CAD in-charge for a particular project. The Drawing files are located in server (Many users will work on that files). I would to keep a record that which user (and which date) has opened a particular drawing file in Notepad file. I am having a lisp program file to do that job. But it is working only with my computer when I upload that file (or startup suite). But many users are also there to work in that same file. My question is that, Is there any possibility to attach a lisp file to a particular drawing file without loading? If any user opens the drawing file, I can easily know from the recorded in notepad.
Solution using .Net are also welcome.
Thanks in Advance
Sorry. I didn't ask my question correctly. I will clarify now.
A group of 8 users (on individual computers) including myself to work on a particular drawing file.
Anybody within our group can open and work on the drawing file. But only I have a lisp program loaded automatically (start up suit) in my computer (C drive). The function of the code is that, Whenever the drawing gets opened in my computer, the lisp code will read drawing name, path, login username (my name) & time, and write to a pre-defined text file (notepad).
It is working nicely if I open the drawing from my computer. But when any other person opens the drawing file in other computer, it doesn't work since they don't have the lisp code in their computer.
I want to run the lisp code (without loading in each person's computer) whenever the drawing file is opened by any user, and in any computer. (Example : Mr. X is opening that particular drawing in his computer in my absence. Next day when I come to office, I must know that Mr. X has opened that drawing yesterday at so and so time)
Is there any way to do that?
Note: I am the writer of the lisp code.
@Anonymous wrote:
....
A group of 8 users (on individual computers) including myself to work on a particular drawing file.
....
I want to run the lisp code (without loading in each person's computer) whenever the drawing file is opened by any user, and in any computer.....
I think similar questions have been raised before, but I'm not sure just what to Search for, or whether any are quite the same thing. But here's a thought....
Make a drawing called something distinctive, such as OpenLogRecord.dwg, which contains no drawn content. Insert that into any drawing that you want to keep track of in this way, at any insertion point and scales and rotation. Assuming you have a server-based acaddoc.lsp file that does its thing for all Users on opening any drawing, include in that a function like this:
(if (tblsearch "block" "OpenLogRecord")
(....do what it does ....)
)
Since the drawing [a Block within any drawing it's Inserted into] contains no drawn content, it can't be Erased by object selection, and therefore can't be Purged out of the drawing unless it's removed by certain other means that probably only pretty sophisticated Users would be able to pull off, such as finding it with (ssget) if they know its name. [A less sophisticated way would be Erase All, if the User is in the same drawing space in which it was Inserted, but no one's going to do that.] And when you get to a point where you don't want to keep such a record for a particular drawing, you can remove that Block using (ssget), and Purge its definitioin, and it will no longer trigger entries into the record.
That should do it for any drawing in which that is Inserted, but for no other drawings, so you won't end up with record files about a lot of drawings you don't want to keep such track of.
Your drawings are on a server, so everybody can access them, right? Do the same with your LISP files. Standardize the start-up routine so everybody is running the same ACAD.LSP and ACADDOC.LSP files, which will ensure specific LISP files are loaded and settings are made.
You will never be able to get code to run without loading (think about it), and while you kinda-sorta can "embed" LISP into a DWG file that can lead to VERY BAD THINGS. Much better to go to a centralized standard set-up for all users.
Hi,
It's no clear to me why a pure AacadXXdoc.lsp solution it's not enough?, i'm thinking in something like :
(setq CurrentDWG (getvar "DWGNAME")
(if (= currentDWG SomeDWgToTrack) ;this condition could be changed to a list of dwg to be tracked
(some stuff here, for example log user data)
)
That code will run every time AutoCAD open a drawing.
Gaston Nunez