2 Replies Latest reply on Oct 6, 2015 11:22 AM by Steven Hanson

    EPDM API Selectivly Destroy Files

    Steven Hanson

      I hope this is a simple answer and I'm missing something.


      I have found the example how to destroy all deleted files in a folder in the EPDM API Help (http://help.solidworks.com/2015/english/api/epdmapi/destroy_deleted_files_in_vault_example_vbnet.htm_)


      What I can't seem to find is how to destroy a single file.  I would like to automate the process of destroying all "Private Files" users previously deleted but not files that have been previously checked in and assigned a workflow state they have deleted.

        • Re: EPDM API Selectivly Destroy Files
          Adrian Velazquez

          Those are some deep water your venturing into. I wouldn't automated anything that deals with permanently deleting data... just my preference though

            • Re: EPDM API Selectivly Destroy Files
              Steven Hanson

              I can understand your statement but let me explain the scenario.


              In our practices we have three deleted file scenarios:

              1. User deletes a private file.  This is common with trying ideas etc... where work is never checked into vault, they are allowed to do this without cad admin intervention.
              2. PDF's are auto generated and stored in vault when a drawing goes thru workflow and the old PDF revision is deleted and new one replaces.
              3. User deletes a file that has been checked in.  User required to move to a "Recycle Bin" delete and submit a support ticket to be purged.


              Both 1 and 2 generate a fare number of files stranded in the EPDM recycle bin pending "Destroy" and as a fulltime engineer moonlighting as our department CAD admin this ties up a fair bit of my time sorting thru the files and destroying case 1 and 2, while not destroying case 3 unless I have proper backup. And anyone whom has ever dealt with a large department knows getting users to do simple maintenance like purging there own files is next to impossible,     I have generated SQL reports from the database that sort them into scenarios that I can use to selectively destroy.