3 Replies Latest reply on Mar 6, 2018 5:15 PM by Jason Kerns

    IEdmFile5.Unlockfile gives error E_EDM_FILE_NOT_FOUND  0x80040213

    Brian Titus

      Having issues with EPDM API that are boggling:

      Here's a snippit:


      ' get the source file

      aFile = vault.GetFileFromPath("C:\PDM_Vault\old_file.sldprt")

      aPos = aFile.GetFirstFolderPosition

      aFolder = aFile.GetNextFolder(aPos)


      ' copy the file to a new filename in the same folder

      bfileID = aFolder.CopyFile(aFile.ID, aFolder.ID, Me.Handle.ToInt32(), "new_file.sldprt", 0)

      bfile = vault.GetFileFromPath("C:\PDM_Vault\new_file.sldprt")


      ' eveything seems to look like it's working

      ' got both afile and bfile

      ' got both id's

      ' file appears to be in the vault (in windows explorer in Private state)


      'now let's check it in

      bfile.UnlockFile(Me.Handle.ToInt32(), "Copy of original file")              


      This last statement throws an error:


      E_EDM_FILE_NOT_FOUND    0x80040213  The file could not be found


      Anybody got any advice?  I'm at my wits end...