AnsweredAssumed Answered


Question asked by Marc Baumstimler on Feb 13, 2021



I write program with DELPHI to modify card on files in pdm.

But I obtain error E_EDM_MISSING_PLUGIN_COMPONENT on the instruction UnlockFiles.

I don't understand this error because I can unlock the file manually. It is just with my program I can't !

and the undolock work correctly.


HAve you an idea ?


Here is a part of my program :


// Lock the file
FileObj.LockFile(, 0, EdmLock_Simple);

// Commit updates
BatchUpdate.CommitUpdate(Errors, nil);

Hres := BatchUnlock.CreateTree(0, Eubtf_MayUnlock+Eubtf_ShowMultipleWarnings, nil, notempty);
// Verification messages
Memo1.Lines.Add('BatchUnlock CreateTree notempty= ' + notempty.ToString);
// => HRESULT = S_OK the create tree is ok
Memo1.Lines.Add('BatchUnlock CreateTree= ' + IntToStr(Hres));
// I Verify the list of files
BatchUnlock.GetFileList(Eubtf_MayUnlock, FilesList);
// The count is egal to 1 file, that's ok
Memo1.Lines.Add('GetFileList =' + FilesList.Get_Count.ToString);

// List the files in the Files List
Pos := FilesList.GetHeadPosition;
I := 0;
While I < FilesList.Count do
    // get the name and id of the file
    FilesList.GetNext(Pos, FileName, idFile, idFold);
    // Message = The Filename is good - I have the good file in the batch
     Memo1.Lines.Add('Getnext = ' + FileName+' id= '+idFile.ToString+' Foldid= '+idFold.tostring);

// Unlock files don't work and give HRESULT not null
Hres := BatchUnlock.UnlockFiles(0, nil);

// Find the error message and show it
ErrMsg:=(Coffre as IEdmVault11).GetErrorMessage(Hres);

Memo1.Lines.Add('Error = ' + ErrMsg);
// the error message is E_EDM_MISSING_PLUGIN_COMPONENT
// => The file format plug-in cannot handle this file because a component is missing
// But the file is a solidworks part and the unlock work manually !!


// The undoLock work correctly ???