Hide Table of Contents
UnlockFile Method (IEdmFile5)

Checks in this file.


Visual Basic (Declaration) 
Sub UnlockFile( _
   ByVal lParentWnd As System.Integer, _
   ByVal bsComment As System.String, _
   Optional ByVal lEdmUnlockFlags As System.Integer, _
   Optional ByVal poIEdmRefCallback As System.Object _
void UnlockFile( 
   System.int lParentWnd,
   System.string bsComment,
   System.int lEdmUnlockFlags,
   System.object poIEdmRefCallback
void UnlockFile( 
&   System.int lParentWnd,
&   System.String^ bsComment,
&   System.int lEdmUnlockFlags,
&   System.Object^ poIEdmRefCallback


Parent window handle
Version comment to show in the history dialog box
Optional combination of EdmUnlockFlag bits; default is EdmUnlockFlag.EdmUnlock_Simple
Optional Nothing or null



If the file or its file data card contents have changed, this method creates a new version.

IEdmBatchUnlock is more efficient than this interface for checking in multiple files.

Return codes:

  • S_OK: The method successfully executed.
  • S_FALSE: The method successfully executed, but as no file is modified, SOLIDWORKS PDM Professional did not create a new version.
  • E_EDM_FILE_NOT_LOCKED_BY_YOU: The file is not checked out by the logged-in user.
  • E_EDM_LOCKED_ON_OTHER_COMPUTER: The file is not checked out on the client machine where you tried to check it in.
  • E_EDM_FILE_NOT_FOUND: The file is not part of the vault.
  • E_EDM_LOCAL_FILE_NOT_FOUND: There is no copy of the file in the cache folder on the client machine.
  • E_EDM_FILE_SHARE_ERROR: The file is open exclusively in another program.
  • E_EDM_CANCELLED_BY_USER: Not implemented.
  • E_EDM_INVALID_FILE: The file format is not recognized, and you have specified to not check in such files.
  • E_EDM_MISSING_MANDATORY_VALUE: The file lacks a value for a required file data card variable.
  • E_EDM_OPERATION_REFUSED_BY_PLUGIN: One of the loaded EdmCmdType.EdmCmd_PreUndoLock hooks did not permit the operation.  

See Also


SOLIDWORKS PDM Professional Version 5.2

Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

Subject:   Feedback on Help Topics
Page:   UnlockFile Method (IEdmFile5)
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:


We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again

Web Help Content Version: API Help (English only) 2018 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.