Vba - EPDM Link

Hello

Does your file open well in SW?

An example of how to use GetDesignTable in VBA: http://help.solidworks.com/2013/English/api/sldworksapi/Get_Design_Table_Example_VB.htm

Also try adding the line

File.GetFileCopy (0)

just after the line

Vault.GetFileFromPath("Le_nom_de_ton_fichier_avec_le_chemin", Folder)

Kind regards

I just inserted the line you pointed out to me and the error is on this line, the same error.

Yes, my file opens well in SW and my macro works wonderfully as long as I clicked on my file beforehand to "Get the latest version". 

This confirms that this is indeed the reason for the bug.

Edit: regarding the use of GetDesignTable I use it as indicated.

I don't see it. For your information, I don't have any operating error with the following macro:

Dim swApp As Object

Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long

Sub main()

    Set swApp = Application.SldWorks

    Dim Vault As New EdmVault5

    Dim File As IEdmFile5
    Dim Folder As IEdmFolder5

    Vault.LoginAuto "Coffre_BE", 0

    Set File = Vault.GetFileFromPath("C:\Coffre_BE\TEST\0088880001.SLDPRT", Folder)
    
    Set Part = swApp.OpenDoc6(Folder.LocalPath & "/" & File.Name, 1, 2, "", longstatus, longwarnings)
    
    swApp.ActivateDoc2 File.Name, False, longstatus
    
    Set swModel = swApp.ActiveDoc
    
    swModel.ViewZoomtofit2

End Sub

The only message I get is that the Epdm asks me if I want to extract the file when it is loaded, a normal message since it is not. FYI I don't need the GetFileCopy line.

I'm on the 2015 version.

Kind regards