3 Replies Latest reply on Dec 20, 2018 4:17 AM by Jerome De San Nicolás

    Rollback to "Revision:" Event API

    Mario Zahren

      Hello all,

      how to rollback a File in vault to the event "Revision:"? The only thing I can get is the Version but that is unfortunately not the Revision-Entry in the History of the file.

      Here the code I use so far:


      public void releaseNativDocInvalid(string EcnNewComment, IEdmFile8 File, IEdmFolder5 ppoRetParentFolder, string configName, IEdmVault13 vault)




                      IEdmHistory history = vault.CreateUtility(EdmUtility.EdmUtil_History) as IEdmHistory;



                      Array historyItems = Array.CreateInstance(typeof(EdmHistoryItem), 0);


                      history.GetHistory(ref historyItems, (int)EdmHistoryType.Edmhist_FileRevision);


                      string targetRevision = ((EdmLib.EdmHistoryItem[])historyItems)[1].moData.mbsStrData1;

                      int targetVersion = ((EdmLib.EdmHistoryItem[])historyItems)[1].mlVersion;


                      IEdmEnumeratorVersion5 verEnum = default(IEdmEnumeratorVersion5);

                      verEnum = (IEdmEnumeratorVersion5)File;


                      IEdmVersion5 ver = default(IEdmVersion5);

                      ver = (IEdmVersion5)verEnum.GetVersion(targetVersion);



                  catch (COMException exp)


                      string errorName, errorDesc;

                      vault.GetErrorString(exp.ErrorCode, out errorName, out errorDesc);

                      vault.MsgBox(0, errorDesc, EdmMBoxType.EdmMbt_OKOnly, errorName);




      Any sugestions?