Hi all!
To explain the context of my "problem", I would like to use a macro to run from SolidWorks to open the PDM tree copy window (see below):
The way I have found so far would be to use the "CopyTree (IEdmVault19)" method (CopyTree Method (IEdmVault19) - 2018 - SOLIDWORKS API Help) specifying the value of "vbShowDlf" to "True" in order to display the window!
To try to use this method, I made the following macro:
Dim swApp As SldWorks.SldWorks
Dim vault As IEdmVault19
Dim copyTreeOptions As EdmCopyTreeOptions
Sub main()
Set vault = New EdmVault5
vault.LoginAuto "XXXXXXXX", 0
copyTreeOptions.mbsPrefix = "Copy_"
test = vault.CopyTree(aFile.ID, Folder.ID, destFolder, True, True, copyTreeOptions, 0)
End Sub
I haven't yet set up everything related to the ID(s) of the files you want to copy but I don't think that's the source of the problem.
My problem is that when trying to launch this macro I get the following error message which seems to be related to the "CopyTreeOptions":
Does anyone have an example of how to use the "CopyTree (IEdmVault19)" method so that I can use it as an example? Where else would you have ideas to achieve what I'm trying to do?
Thank you very much in advance!