1 Reply Latest reply on Aug 23, 2018 12:37 PM by Daen Hendrickson

    PDM Workgroup API Maximum Number of Projects in PDMWConnection

    Daen Hendrickson

      I am using SW2014 SP5.


      I have been working on a macro (something I have not done in a long time) that updates a local drawing and checks it into our PDM Workgroup vault.


      After all the preliminaries the macro throws a Run-Time error:

           Microsoft Visual Basic

           Run-time error '-2147220940 (80040232)':

           The file could not be found. (52)


      on the PDMWConnection.CheckIn command.


      In the VBA Locals window, all of the variable inputs for the CheckIn command show the expected values. However, I notice that the PDMWConnection object (if that is what it is) has subfolders including Projects. Within the Projects subfolder is a "count" of 305 and Item # subfolders that correspond with each project folder in the vault. These Item folders are numbered "Item 1" through "Item 256". I have more vault folders than the 256 can accommodate - I assume I have 305. And the folder I want to check the file into is NOT included in the listed ITEM subfolders.


      Can anyone confirm that the CheckIn method has this 256 limitation? If so, does anyone have a work-around?


      EDIT: Additional Information...

      I had read in the Knowledge Base that the CheckIn method might need for the file to be checked in to be closed. I added this to my macro (close the drawing before checkin) but saw the same Run-Time Error (52). So I can eliminate that as a potential cause.



      I posed this same question to my VAR and am awaiting any feedback.


      To test my hypothesis, I applied my macro to a different (much older) drawing that resided in a project of the vault that happened to be captured within the 256 Item folders. And it worked as expected. That is one bit of data that suggests the above information has some merit.


      Additional thoughts on work-around... I could temporarily rename the project my target file is in to something that would land in the 256 zone, run my check in command , and then restore the project folder name. Of course there is no "rename" capability in Workgroup - only create new and move. So even though the above my be possible, it might also be way more "comings and goings" than practical.




        • Re: PDM Workgroup API Maximum Number of Projects in PDMWConnection
          Daen Hendrickson

          The short answer to this is that there isn't one... the problem vanished without explanation.


          I contacted our VAR. We stepped through a number of iterations with them asking for certain information and requesting a handful of temporary coding lines to help understand. I could fail the macro repeatably and predictably. After several rounds of this they finally elevated this issue to SolidWorks.


          With time constraints and work needs I shelved the macro for a few weeks until SW could weigh in. They set up a GoToMeeting session to observe the macro in action on my machine. ...And it worked without issue. Did not fail. At all. And hasn't since...


          What changed in the interim? Certainly nothing in the code. My workstation had been rebooted a few times - and, yes, I had rebooted it a few times while trying to diagnose the macro. Some Windows Updates were deployed in our office. The ancient antiquated under-powered office PC that hosts the PDMWorkgroup vault in the background while also acting as a full-time desktop was also rebooted with the Windows Updates install. (A proper server to run PDM so that we can unload it from the desktop as well as upgrade the software has been a stated TOP PRIORITY for three years running now... not holding my breath). The Perseid Meteor Showers are in action. Beyond that, I've got nothing.