ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
SBSussi Birkevang08/09/2021

Hi

I am writing a Task add-in - it should among other things check out the file.

Dim _file As IEdmFile16
_file = _vault.GetObject(EdmObjectType.EdmObject_File, fileID)

'Check out file
If Not _file.IsLocked Then
_file.LockFile(foldID, 0, CInt(EdmLockFlag.EdmLock_Simple))
End If

But it ends up with this error: E_EDM_DATABASE_ACCESS (0x080040207)

Can anybody tells me what the problem is?

I have run the functions in a stand-alone add-in in PDM, and it works. But when I put it into the code for the Task add-in it fails.

Sussi