Hi, shot in the dark, but is anyone else having trouble with the 2022 pdm api batch check-in interface?
I had to revert to testing with the solidworks provided example in order to rule out myself adding a problem with my own code. I get an error with the example code. EXAMPLE CODE: (https://help.solidworks.com/2022/Englis ... esigner.cs)
The error I get is on with line 156 in the example code. "batchUnlocker.AddSelection((EdmVault5)vault1, ref ppoSelection);"
Any one else having this problem and are there any known workarounds?
Cross posted on the swamp.
2022 sp4 PDM API Issue with batchUnlocker.AddSelection
-
- Posts: 46
- Joined: Thu Apr 15, 2021 5:44 pm
- x 12
- x 27
2022 sp4 PDM API Issue with batchUnlocker.AddSelection
I think I figured it out. when I upgraded to 2022 and reselected epdm.interop.epdm I forgot to flip "embed interop types" from true to false again. Flipped it back and it works!
Go to full postRe: 2022 sp4 PDM API Issue with batchUnlocker.AddSelection
I just ran the example code with no problems. Can you ZIP up your Visual Studio solution with just the SW example code and upload it?
Re: 2022 sp4 PDM API Issue with batchUnlocker.AddSelection
Just a shot in the dark, but did you double check that the properties "Prefer 32-bit" in your visual studio project is unchecked? This can cause the API to freak out unexpectedly.
-
- Posts: 46
- Joined: Thu Apr 15, 2021 5:44 pm
- x 12
- x 27
-
- Posts: 46
- Joined: Thu Apr 15, 2021 5:44 pm
- x 12
- x 27
Re: 2022 sp4 PDM API Issue with batchUnlocker.AddSelection
I did have this checked, but when I unchecked it, I got a problem with the openfiledialog. I commented that stuff out and just hard coded a file id and folder id to my pposelection single element array.
Same issue.
-
- Posts: 46
- Joined: Thu Apr 15, 2021 5:44 pm
- x 12
- x 27
Re: 2022 sp4 PDM API Issue with batchUnlocker.AddSelection
Attached is the example code with filedialog related code commented out and file id and folder id hard coded just to focus on the one issue. You would have to replace the hard coded values with ids that match folders and documents in your vault to run this. I had working code prior to upgrading to 2022 sp4, so I suspect something is broken or has changed on the upgrade, so the version of the api you are running I believe is important.
- Attachments
-
- BatchUnlockFiles_CSharp.zip
- (70.04 KiB) Downloaded 48 times
-
- Posts: 46
- Joined: Thu Apr 15, 2021 5:44 pm
- x 12
- x 27
Re: 2022 sp4 PDM API Issue with batchUnlocker.AddSelection
I think I figured it out. when I upgraded to 2022 and reselected epdm.interop.epdm I forgot to flip "embed interop types" from true to false again. Flipped it back and it works!
Re: 2022 sp4 PDM API Issue with batchUnlocker.AddSelection
I think that gets us all from time to time which is why this and the 32-bit selection are the first things typically suggested to check before digging further into the code. Glad you got it sorted!nordstjernen740 wrote: ↑Thu Nov 03, 2022 9:54 am I think I figured it out. when I upgraded to 2022 and reselected epdm.interop.epdm I forgot to flip "embed interop types" from true to false again. Flipped it back and it works!