Results 1 to 10 of 13

Thread: Last person to save

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I could stop if I wanted to
    Join Date
    2004-07
    Posts
    206
    Login to Give a bone
    0

    Default Last person to save

    Hi Guys,

    What is the tip to trace Cad technician who save the last the drawing if we don't have stamp being set?

    cheers

  2. #2
    Active Member
    Join Date
    2010-06
    Posts
    57
    Login to Give a bone
    0

    Default Re: Last person to save

    One way of doing it with the drawing not open is to right click on the file & look at the properties box. Choose the statistics tab & it should have last saved by there.
    Not sure how you can do it if the drawing is open though.

  3. #3
    I could stop if I wanted to
    Join Date
    2004-07
    Posts
    206
    Login to Give a bone
    0

    Default Re: Last person to save

    Thats my problem now.If i right click the file name and check the properties, the text appear in the line "Last save by" is our company name. No specific name for PC users (maybe its our IT fault why it came out like this). Thats why i ask if anyone have tip/s to trace it inside Autocad.

    cheers.

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,653
    Login to Give a bone
    0

    Default Re: Last person to save

    Give this a try:

    Code:
    (vl-load-com)
    
    (defun c:DwgOwner (/ *error* ok oAdsSecurityUtility oSecurityDescriptor)
      (princ "\rDWGOWNER ")
    
      (defun *error* (msg)
        (if	oSecurityDescriptor
          (vlax-release-object oSecurityDescriptor)
        )
        (if	oAdsSecurityUtility
          (vlax-release-object oAdsSecurityUtility)
        )
        (cond ((not msg))							; Normal exit
    	  ((member msg '("Function cancelled" "quit / exit abort")))	; <esc> or (quit)
    	  ((princ msg))							; Fatal error, display it
        )
        (princ)
      )
    
      (if
        (and
          (setq ok (= 1 (getvar 'dwgtitled)))
          (setq oAdsSecurityUtility
    	     (vlax-get-or-create-object
    	       "ADsSecurityUtility"
    	     )
          )
          (setq oSecurityDescriptor
    	     (vlax-invoke
    	       oAdsSecurityUtility
    	       'GetSecurityDescriptor
    	       (strcat (getvar 'dwgprefix)
    		       (getvar 'dwgname)
    	       )
    	       1
    	       1
    	     )
          )
        )
         (prompt
           (strcat "= "
    	       (strcase (vlax-get oSecurityDescriptor 'owner))
           )
         )
         (cond
           (oAdsSecurityUtility
    	(prompt
    	  "\n** Unable to obtain \"SecurityDescriptor\" object **"
    	)
           )
           (ok
    	(prompt
    	  "\n** Unable to create \"ADsSecurityUtility\" object **"
    	)
           )
           ((prompt "\n** The drawing has not been saved yet **"))
         )
      )
      (*error* nil)
    )
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3630, Core i9-9900K 5.0GHz, 128GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  5. #5
    I could stop if I wanted to
    Join Date
    2004-07
    Posts
    206
    Login to Give a bone
    0

    Default Re: Last person to save

    Thanks BlackBox but didnt work. Any advice?

    Quote Originally Posted by BlackBox View Post
    Give this a try:

    Code:
    (vl-load-com)
    
    (defun c:DwgOwner (/ *error* ok oAdsSecurityUtility oSecurityDescriptor)
      (princ "\rDWGOWNER ")
    
      (defun *error* (msg)
        (if	oSecurityDescriptor
          (vlax-release-object oSecurityDescriptor)
        )
        (if	oAdsSecurityUtility
          (vlax-release-object oAdsSecurityUtility)
        )
        (cond ((not msg))							; Normal exit
    	  ((member msg '("Function cancelled" "quit / exit abort")))	; <esc> or (quit)
    	  ((princ msg))							; Fatal error, display it
        )
        (princ)
      )
    
      (if
        (and
          (setq ok (= 1 (getvar 'dwgtitled)))
          (setq oAdsSecurityUtility
    	     (vlax-get-or-create-object
    	       "ADsSecurityUtility"
    	     )
          )
          (setq oSecurityDescriptor
    	     (vlax-invoke
    	       oAdsSecurityUtility
    	       'GetSecurityDescriptor
    	       (strcat (getvar 'dwgprefix)
    		       (getvar 'dwgname)
    	       )
    	       1
    	       1
    	     )
          )
        )
         (prompt
           (strcat "= "
    	       (strcase (vlax-get oSecurityDescriptor 'owner))
           )
         )
         (cond
           (oAdsSecurityUtility
    	(prompt
    	  "\n** Unable to obtain \"SecurityDescriptor\" object **"
    	)
           )
           (ok
    	(prompt
    	  "\n** Unable to create \"ADsSecurityUtility\" object **"
    	)
           )
           ((prompt "\n** The drawing has not been saved yet **"))
         )
      )
      (*error* nil)
    )

  6. #6
    I could stop if I wanted to
    Join Date
    2004-07
    Posts
    206
    Login to Give a bone
    0

    Default Re: Last person to save

    Hi BlackBox its working now, problem it appear like this.

    Code:
    Command:
    Command: DWGOWNER
    DWGOWNER = S-1-5-21-421223986-415093667-787569037-1022
    note the drawing was in our server.

    cheers
    Last edited by BlackBox; 2014-05-16 at 02:01 PM. Reason: Please use [CODE] Tags

  7. #7
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,653
    Login to Give a bone
    0

    Default Re: Last person to save

    Interesting; something is clearly different about our environments, as the format I get returned to the Command Line, is in the <DomainName>/<UserName> format.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3630, Core i9-9900K 5.0GHz, 128GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

Similar Threads

  1. Does anyone have a 3D person?
    By ReachAndre in forum AutoCAD 3D (2007 and above)
    Replies: 10
    Last Post: 2007-05-22, 06:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •