This task script is a patchwork and some parts related to pdm are already written as late binding, while the snipped below is derived from some code written as early binding...
I am not sure this is the problem, but if I comment the snippet the pdm task runs without crashing, so the problem is likely there.
I would like to convert this snippet from early binding to late binding, and try to run in our pdm sandbox again.
anyone could help me?
Code: Select all
Sub GetLocalCopies(vFilePaths As Variant)
Dim pdmBatchGetUtil As EdmLib.IEdmBatchGet
Set pdmBatchGetUtil = Vault.CreateUtility(EdmUtil_BatchGet)
Dim pdmSelItems() As EdmLib.EdmSelItem
ReDim pdmSelItems(UBound(vFilePaths))
Dim filePath As String
filePath = vFilePaths(0)
Dim pdmFile As EdmLib.IEdmFile5
Dim pdmFolder As EdmLib.IEdmFolder5
Set pdmFile = Vault.GetFileFromPath(filePath, pdmFolder)
pdmSelItems(0).mlDocID = pdmFile.ID
pdmSelItems(0).mlProjID = pdmFolder.ID
pdmBatchGetUtil.AddSelection Vault, pdmSelItems
pdmBatchGetUtil.CreateTree 0, 32
pdmBatchGetUtil.GetFiles 0
End Sub