ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
JSJeroen Scherpenzeel16/07/2010

I am trying to make a C# Windows Service that can take a solidworks file (SLDDRW in particular) and save these as DWG's (1 DWG for each sheet). The program works fine, but now I want to correct the references that I know are corrupt. I already know where the correct files are, but I can't get the ReferenceNotFoundNotify event to work.

Whenever the program reaches the line where I add an event handler method, I get the following error:

     Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Earlier, when I was trying to start up the SldWorksClass object (create an instance of it), I got a similar message about a 80080005 error message. The solution was to go to Control Panel -- Component Services -- Computers -- My Computer -- DCOM Config -- SldWorks 2010 Application and set some user access rights on this object. After I did that, and set the account to run in to interactive (Identity tab), the solidworks class could be instantiated.

The error that I get now has something to do with the COM components, at least I think. Are there any other COM components that SolidWorks uses? What is so particular about using this event, does the dll try to access something external for this event, or something?

I don't know where to look anymore, internet doesn't have much on this issue, certainly not on SolidWorks + this issue.

I have added a short version of my source code as attachment. Please help!