1 Reply Latest reply on Nov 28, 2018 9:48 AM by Jim Sculley

    Stand-alone C# state transition comments

    Joe Schiavone

      In a stand-alone C# program, how can I retrieve the state transition comments for a specific file? I'm getting lost going from Interface to Interface.

      Thank you.

       

                                                                                 - Ed Woychowsky

        • Re: Stand-alone C# state transition comments
          Jim Sculley

          Something like this:

          IEdmHistory2 historyProvider = (IEdmHistory2)vault.CreateUtility(EdmUtility.EdmUtil_History);
          historyProvider.AddFile(targetFile.ID);
          Array histArray = Array.CreateInstance(typeof(EdmHistoryItem), 0);
          historyProvider.GetHistory(ref histArray, (int)EdmHistoryType.Edmhist_FileState);
          EdmHistoryItem[] historyItems = (EdmHistoryItem[])histArray;
          String firstTransitionComment = historyItems[0].mbsComment;