So we are converting multiple SW Drawings to PDF on a server. We have special Service installed on server that locks request for convert, so that one SLDDRW at the time is being converted. That Service is starting .exe that has functions with SW API to convert given SLDDRW to PDF. The first one goes OK and its converted, the second one goes OK and its converted to PDF and after that the thrid one, fourth one and so on, are freezed on OpenDoc. In rare ocasions I get SW Runtime error, but most of tries there is a freeze on OpenDoc command.
This is code for opening:
DocumentSpecification swdocspec = (DocumentSpecification)swinstance.GetOpenDocSpec(targetFile);
swdocspec.DocumentType = docType;
swdocspec.ReadOnly = false;
swdocspec.Silent = true;
swModel = swinstance.OpenDoc7(swdocspec);
fileerror = swdocspec.Error;
filewarning = swdocspec.Warning;
If I End SLDWORKS.exe manualy in Task Manager .exe goes forward, .exe throws error and Service goes on next Task. Does anyone have any advice or solution on this? User rights on Service and .exe are Administrator.
SolidworksApi macros