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.
ADDITIONAL EDIT:
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.
Thanks,
Daen
SolidworksApi/macros