AnsweredAssumed Answered

IEdmBatchUnlock2 Don't check in ref files

Question asked by Joe Pickens on Apr 19, 2017
Latest reply on Apr 20, 2017 by Tim Webb

i am using IEdmBatchUnlock2 to check in some files (shown in the code below) The issue i am having is that when i run this code it also try's to check in any of my selected items checked out reference files. The only files I want checked in are the ones i have listed in my EdmSelItem Array.


How do i not select the reference files?        


EdmSelItem[] ppoSelection = BatchSelect(FileNames, Vault);          

// Add selections to the batch of files to check in          

IEdmBatchUnlock2 batchUnlocker = (IEdmBatchUnlock2)vault2.CreateUtility(EdmUtility.EdmUtil_BatchUnlock);          

batchUnlocker.AddSelection((EdmVault5)Vault, ref ppoSelection);          

if ((batchUnlocker != null))           


     batchUnlocker.CreateTree(0, (int)EdmUnlockBuildTreeFlags.Eubtf_SkipOpenFileChecks + (int)EdmUnlockBuildTreeFlags.Eubtf_MayUnlock);                    

     batchUnlocker.Comment = "Addin Updates";              

     IEdmSelectionList6 fileList = (IEdmSelectionList6)batchUnlocker.GetFileList((int)EdmUnlockFileListFlag.Euflf_GetUnlocked);               

     IEdmPos5 aPos =      fileList.GetHeadPosition();               

     EdmSelectionObject poSel;              


     while (!(aPos.IsNull))              


          fileList.GetNext2(aPos, out poSel);              



     bool retVal = batchUnlocker.ShowDlg(0);              

     object statuses = null;              

     if ((retVal))              


          batchUnlocker.UnlockFiles(0, null);                  

          statuses = batchUnlocker.GetStatus((int)EdmUnlockStatusFlag.Eusf_CloseAfterCheckinFlag);                  

          Interaction.MsgBox("Close Files after Check In selected? " + statuses);