AnsweredAssumed Answered

Batch Checkin/Checkout Using menu command -API

Question asked by Pichaiyan Prabaharan on Dec 14, 2020
Latest reply on Dec 20, 2020 by Amen Allah Jlili

Hi,

I tried to do Batch checkin/Checkout. But its not processing all the files I selected. Its just process only that selected(where I right click). Am I doing anything wrong?

 

  Case EdmCmdType.EdmCmd_Menu

                If poCmd.mlCmdID = 1000 Then

                    poCmd.mlEdmRefreshFlags = 1
                    Dim edmVault As IEdmVault7 = TryCast(poCmd.mpoVault, IEdmVault7)
                    Dim edmBatchUnlock As IEdmBatchUnlock
                    edmBatchUnlock = edmVault.CreateUtility(EdmUtility.EdmUtil_BatchUnlock)
                    Dim i As Integer = 0
                    Dim selectedItems(i) As EdmSelItem

                    For Each AffectedFile As EdmCmdData In ppoData

                        Dim oFile As IEdmFile5 = edmVault.GetObject(EdmObjectType.EdmObject_File, AffectedFile.mlObjectID1)
                        selectedItems(i).mlDocID = AffectedFile.mlObjectID1
                        selectedItems(i).mlProjID = AffectedFile.mlObjectID3
                        MessageBox.Show(oFile.GetLocalPath(AffectedFile.mlObjectID3).ToString)
                        i = i + 1

                    Next

                    Try
                        edmBatchUnlock.AddSelection(edmVault, selectedItems)
                        edmBatchUnlock.CreateTree(0, 1)
                        edmBatchUnlock.UnlockFiles(0)
                    Catch ex As Exception
                        MessageBox.Show(ex.Message.ToString)
                    End Try

                End If
        End Select

 

Thanks

Outcomes