Version 4.6
Is there only version 4.6?
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.
After that, like Cyril.f no more idea...
For my part I have 4.6.1 and 4.7 on the other hand I am on Windows 7 and SW/PDM 2016 and no problem with my macros that have been running since 2009.
I went to the windows feature activation window, originally it was like the first window above and I changed to the second window (still below):
What I don't understand is that even after activation it wouldn't be in the list of programs following version 4.6
Do I have to physically install them?
Yes, I just saw that 3.5 is included in Windows 7.
So now I have more ideas except to install 4.7 (latest version I think) to see and what won't hurt anyway.
Hello
Which version of PDM do you have? Standard or Professional?
I just saw that the error 0x800402F2 corresponds to "The API is not supported in SOLIDWORKS PDM standard version", see on page http://help.solidworks.com/2017/english/api/epdmapi/epdm.interop.epdmresultcode~epdm.interop.epdmresultcode.edmresulterrorcodes_e.html.
If it's the Standard version, I'm not sure you can drive it by the APIs!!!!!
See the comparison between the two: http://www.lynkoa.com/sites/default/files/questions/23/03/2016/solidworks_pdm_standard_comparatif_vs_pdm_pro.pdf
Kind regards
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.
Thank you very much, I'll keep you posted
Yves
Hello
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.
Hello
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...
Hello
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".
Kind regards
epdm.jpg
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.
In the help this is not marked as being only for PDM Pro, see http://help.solidworks.com/2017/french/EnterprisePDM/FileExplorer/t_Setting_the_Latest_Versions_Option.htm?id=9e9af54ee9ab4cd4aa5ac0c1c56546f4#Pg0&ProductType=&ProductName=
Indeed I finally found it:
But it's strange, the option described in the help doesn't match the one you posted previously.