Have you ever attempted to develop a SOLIDWORKS PDM addin and run into errors when adding it to the vault? This short posts discusses four different types of errors one might actually see when adding a new PDM addin to a vault.

1. The DLL is not com module 

This error simply means that your DLL is com-compliant. Your types were not registered for com interops and probably are not com-visible. You can fix this by:

  • Decorating the class with the ComVisible(“true”) attribute and guid:

  • Going to Project > Build (Compile for VB.NET) and then checking register for com interop.

2. Please Select at least one DLL implementing the IEdmAddIn5 Interface


 

Your add-in class must  implement the IEDMAddIn5 interface.  To implement this interface, you must reference a dll that contains this interface.

  • Add a reference to <SOLIDWORKS PDM INSTALLATION FOLDER>/EPDM.interop.epdm.dll. This assumes you are writing a add-in for CLR4 (SOLIDWORKS 2013 and newer). Here’s a table that summarises the different versions of the PDM interops:
     PDM Professional versions… Support .NET Framework…
    2013 and later 4.0 and later
    2009 – 2012 3.5, 3.0, and 2.0
    2008 and earlier 2.0

    To target earlier version of the CLR, follow this link for instructions.

  • Implement the interface like follow:

    Normally, after writing MyPDMAddInClass : IEdmAddIn5, Visual Studio will show a squiggly line under IEdmAddIn5, press Ctrl + ; and then implement explicity:

3. The add-in ‘<Path>’ cannot be installed since it returned an invalid required version SOLIDWORKS PDM version from its GetAddInInfo Method

This is because of an incomplete implementation of the GetAddInInfo method. A sample implementation of the GetAddInInfo would look like this:

4. The archive server could not open  the Windows registry



This error is because of windows permissions. If you are running Windows 7/10, make sure the run the administration tool with administrator privileges.
If you have downloaded the add-in dll, make sure it’s not blocked by windows. To unblock, simply right on it and go to properties:

Questions or comments? Please share in the comments below!

Amen Jlili

Want to keep up with future CADSharp.com content and training events? Join our newsletter!