0 Replies Latest reply on Jul 6, 2012 11:27 AM by Tom Canepa-Anson

    How to use IEdmBatchGet with IEdmGetOpCallback to see errors when getting latest on a folder

    Tom Canepa-Anson

      I am using a VBA macro to get all the files within a folder. Some of these files will not be accessable as they have been placed in cold storage. I want to identify these files that are in cold storage but don't know how to use the IEdmGetOpCallback.ReportFailure listed in the Enterprise PDM Programmer's Reference Guide. I either get the error "arguement not optional" or "type mismatch". The method works correctly without the IEdmGetOpCallback option.


      Dim folders(1) As EdmSelItem
      folders(0).mlDocID = 0
      folders(0).mlProjID = 5772

      Dim bg As IEdmBatchGet
      Dim OpCall As IEdmGetOpCallback
      Set bg = vault.CreateUtility(EdmUtil_BatchGet)
      bg.AddSelection vault, folders()
      bg.CreateTree 0, EdmGetCmdFlags.Egcf_Nothing


      bg.GetFiles 0, OpCall.ReportFailure()



      does anyone know how to use the IEdmGetOpCallback and how it returns the file ID and error code for each error while it's doing a batch get?