I'm drying up for my part, I don't see where it can come from. Maybe related to the fact that there is no association with Windows accounts (ActiveDirectory) but there apart from the hotline that could give its opinion I don't see.
By any chance, there aren't several EdmServer.exe launched in the task manager?
And as a last resort by launching the macro having closed SW and leaving PDM completely?
Can you try to make a macro in Solidworks just allowing you to connect to the vault to see if it can come from Excel which doesn't necessarily have the same vba tools as SW.
Can you check the framework versions you have on your PC?
On Windows 7 I don't remember how to do it but on Windows 10 you have to activate versions 2.0 and 3.0 in the Windows features otherwise some macros can't work:
So it's quite possible that you need to install the 3.5 framework which includes what you need.
D.Roger I had redone a test after activating version 2 and 3.5 but still nothing.
I didn't have time to install version 4.7 before leaving work last night but I'm doing it on Monday morning. I saw that a colleague's PC has version 4.7 and the macro doesn't work on his PC either so I doubt that this will solve the problem.
The PDM version seems to be the explanation, I'll look into that on Monday.
And so if it's PDM Standard, it's better to look at SQL queries (https://forum.solidworks.com/thread/110018). No API for PDM Standard at the moment, users of this solution would have to report an upgrade request to Solidworks for it to potentially be taken into account for a future version.
First thing this morning, I could indeed notice that we were using the standard version of PDM so no API.
Rather than going through SQL queries, I thought back to G.'s idea which was to include in my code the opening and closing of the part before importing the same part into my assembly. Indeed, I thought I noticed that opening a coin, via the macro, would fetch the last verion of the coin and not the version of the local cash.
So I inserted these lines:
'Open the part to import
Set swDocSpecification = swApp.GetOpenDocSpec(PartPath & "\" & PartName)
Set swModel = swApp.OpenDoc7(swDocSpecification)
'Close the part
swApp.CloseDoc PartName
On my PC the code works, each part opens and closes before importing them into the assembly but I can't know if the code will look for the latest version of each part.
I retested my code on another PC and the same... each part opens and closes before being imported into the assembly... On the other hand, he still won't get the last verion of the play...
In Epdm pro there is a checkbox to always open the latest version of the file (see attached image), to see if the same in standard Epdm. Be careful, this works for all Solidworks files so check if it bothers if necessary to open an asm "as built".
on the standard version, impossible to find this option, what bothers me is that I still remember seeing it last week when I started to realize this cash memory problem and I looked in the PDM settings.
On the other hand, in the settings of each account, I found the cash memory options, and you can update the cash when connecting, it takes a little time to connect but at least it works when executing the macro.