3 Replies Latest reply on Dec 6, 2010 7:34 AM by Jim Sculley

    Problem Loading C# Addin

    Jim Sculley

      EPDM 2010 SP3 on Windows Vista x64.

       

       

      Suddenly, I am unable to load one of my C# addins into PDM in normal or debug mode.  If I try to load it in debug mode, I get the following message:

      debug.png

      I get a similar message trying to load it in non-debug mode.

       

      A quick forum and knowledge base search turned up several 'fixes', none of which worked.  I have tried removing and re-adding the EdmLib (version 5.14.0.0) reference to the project.  I have tried renaming the class and project.  I have tried creating a new project and adding the existing source file to it.  I have commented out all of my code, leaving a bare bones class that implements only the GetAddinInfo and OnCmd methods.  I am not using the AddToolbarImage method.  Nothing works.  I have compared the settings on this project to others and nothing seems out of place.

       

      One thing that does bother me is this:

       

      refs.png

       

      Note the DOS 8.3 file name for the PDM type library.  I'm not sure if this is 'normal'.

       

      This problem has me dead  in the water, so if anyone has any suggestions, I would appreciate it.

       

      Jim S.

        • Re: Problem Loading C# Addin
          Lee CS Young

          You could try logging out of EPDM, killing all processes related to EPDM (EdmServer.exe, ViewServer.exe, AddinSrv.exe, Search, etc)  restarting Explorer, and deleting all the folders related to your addin from C:\Users\<username>\AppData\Local\SolidWorks\SolidWorks Enterprise PDM\Plugins\<vaultname>.

           

          I would rename the class again as well.

           

          Annoying, isn't it?

          • Re: Problem Loading C# Addin
            Lee CS Young

            I fought through this error for a couple hours tonight and was about to give up when I decided to look at other addins that don't have the problem. What I discovered was that if there is any other code in the GetAddInInfo() method that calls another method besides what the addin expects there (AddCmd, AddHook) it fails.

              • Re: Problem Loading C# Addin
                Jim Sculley

                Lee CS Young wrote:

                 

                I fought through this error for a couple hours tonight and was about to give up when I decided to look at other addins that don't have the problem. What I discovered was that if there is any other code in the GetAddInInfo() method that calls another method besides what the addin expects there (AddCmd, AddHook) it fails.

                I have come to the same conclusion.  You cannot call any other EPDM API methods.  I am calling Document Manager and plain old .NET API methods with no problems.  Presumably, until the GetAddinInfo call has returned, the EPDM environment is not properly initialized, so calls to EPDM methods from inside GetAddinInfo fail, resulting in the add-in not loading.

                 

                Jim S.