SldWorks API: opening assembly with OpenDoc6 gives warning sharing violation

Dear all,

I use the OpenDoc6 function to open an assembly in a SldWorks addin. The addin works fine but one warning that I couldn't resolve so far:

The line

swModel = iSwApp.OpenDoc6(path + filename, (int)swDocumentTypes_e.swDocASSEMBLY, (int)swOpenDocOptions_e.swOpenDocOptions_Silent, "", ref fileerror, ref filewarning)

sets the integer filewarning to four, which is a sharing violation warning according to the documentation:

swFileLoadWarning_SharingViolation: 4 or 0x4 = Warning appears if the document is being used by another user

The warning appears indepently if the assembly is opened by another user or not.

Any hints what causes this warning message and how I can resolve it?

Thanks in advance!

Best

Chris

SolidworksApi macros