PDM API AddinMgr AddAddin Bug

Hi Together,

i tried this Standalone Tool from Solidworks:

https://help.solidworks.com/2019/english/api/epdmapi/Load_Addin_Example_CSharp.htm

I have tried this with version 2022 SP 3.1, but I always get the message:

09-08-_2022_17-41-46

It seems that the path is not being read correctly. Does anyone else have this problem?

What kind of add-in are you attempting to add? It looks like it’s having trouble verifying that your DLL implements the IEdmAddIn5 class. I believe I’ve run into this before but I can’t remember exactly what caused it.

  • Have you made sure your add-in has “Prefer 32-bit” unchecked?
  • Your reference DLLs are set to “Imbed Interop Types” = False?

Not sure what else to check at the moment but those should give you a good start.

for testing I have created a very simple addin.
“prefer 32 bit” is unchecked and Imbed Interop Types = false.
Manually everything works there.

Here are a couple of other things to check.

Have you verified that the add-in can load via the Administration tool the standard way?
If possible, could you attach your project for one of us to take a look at?

There is a billion thing that could trigger that. It’s mainly because there is no dll in the file selection you made that implements the IEdmAddin5 interface.

Either paste our code here or create an MVP repo on GitHub so we can help you :slight_smile:

I Uploaded it to GitHub:

if you run the Solution it contains multiple projects. “SimplePDMAddin” is the dll i want to load

The Project AddinMgr_CSharp is the Project from Solidworks.
and the “InstallAddin” Project can be ignored.

Hope you can help me

I’m able to get it to add to the vault normally, as in right-click Add-ins in the Administration tool and select New Add-in. Does this work for you? I’m trying to figure out if your add in is not working or if your add-in installer is not working.

image

Yes exactly, I can insert it normally and it works.

That’s why it’s only a simple addin for testing, so that everything else can be ruled out =)

Now I want to install this simple addin automatically with the project AddinMgr_CSharp (from Solidworks). But this does not work

In your properties of the AddinMgr_CSharp project, un-check Prefer 32-bit.

image

This allowed me to install your add-in

ah i had to to this in this Project. This works now! Thank you very much

1 Like