ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
TWTrayer Wiley31/10/2019

My C# add-in works, but it kills the Windows Explorer or PDM Search Tool window upon completion.

The add-in is a simple menu command on a single file:

  • Pull a variable value
  • REST call to get other data
  • Write new data to other variable values

When it gets to the end of the OnCmd method (and the end of the running code), it kills the window.  I stepped through in debug mode to see all of the main code succeed, then the window still crash after stepping past the last line of code.

It also runs successfully as a hook into Check-in, but again kills the window on finish.

My VAR suggested that I needed to restart my servers to "get things synced up", but that did nothing for me.

At first, I was not including the Interop.EdmLib.dll or the .pdb and .xml files (as below).  Including these still did not fix the crashing issue.

Attached is the main C# file.  Any suggestions would be greatly appreciated.

Perhaps a formatting error in the method(s)?  Or some other Visual Studio setup step?

Using:

Solidworks 2017

Solidworks PDM 17.03.066